This paper describes the design of a microcode-controlled state machine and its software implementation in Atmel AVR microcontrollers. In particular. ATmega103 and ATmega128 microcontrollers are used. This design is closely related to the software implementation of a simulator in AVR microcontrollers. https://smokeysmountainfurnitureoutlets.shop/product-category/rocker/