Why do we divide the frequency of the crystal by 12 in 8051?


Joined Apr 24, 2011
Hello Adejoh, welcome to the forums.

In the future please don't open an old thread, or tack your new question onto someone else's thread. It just works better for all that way. That's why a friendly moderator moved your post here.

Just start your own thread and all will be fine.

As far as your question itself goes, the reason in the underlying hardware of the 8051 is breaking up each instruction into smaller pieces, such as read the next program statement, change a register, read or save data to memory. The designers picked 12 as the number of micro steps to implement the full set of machine instructions.

What each step does. Matters not to a user on any level. I don't know exactly what the steps are or where they are documented so you may need to ask again unless someone else wanders by to add that link.
Last edited:

John P

Joined Oct 14, 2008
The processor divides the basic clock by 12 because that's the way it's designed. Each oscillator cycle does something different in executing the code. In fact there are some instructions that take more than 12 cycles to complete, and the manual will tell you which ones they are.

It's possible to imagine other architectures for a processor which might do the same things externally as an 8051 but with faster internal operation. Dallas Semiconductor (now part of Maxim) came up with an 8051 equivalent that only took 4 cycles per instruction:

Microchip PIC processors have always run at a rate of 4 oscillator cycles per instruction.