Todi
Newbie level 1
![Newbie level 1](/styles/images/ranks/alevel1.gif)
Hello everyone!
So, I'm having lessons about computer architecture and the examples are passed using experiments with an ATMEL 8051 at 22Mhz.
I'm initializing the TIMER0 in 16-bits mode and I'm trying to do the clock count 1 second after another. Knowing this, what I'm doing is:
22Mhz / 12 = 1,833333Mhz x 10^6 = 1833333Hz
1 / 1833333Hz = 0,5us
And I'm stuck in here... what I have to do to know how much times I have to count to 1 second? I mean, what number I have to initiate the TH and TL? And how many times I have to count?
Thank you all!
PS.: I'm using Assembly!
So, I'm having lessons about computer architecture and the examples are passed using experiments with an ATMEL 8051 at 22Mhz.
I'm initializing the TIMER0 in 16-bits mode and I'm trying to do the clock count 1 second after another. Knowing this, what I'm doing is:
22Mhz / 12 = 1,833333Mhz x 10^6 = 1833333Hz
1 / 1833333Hz = 0,5us
And I'm stuck in here... what I have to do to know how much times I have to count to 1 second? I mean, what number I have to initiate the TH and TL? And how many times I have to count?
Thank you all!
PS.: I'm using Assembly!