??? 01/05/05 21:17 Read: times |
#84417 - Getting the timers value into decimal |
I'm using the Atmel AT89C51CC02 with Keil IDE.
When an external event triggers an interrupt to stop the timer and i then store the values; how can i output the current time value to the screen in decimal format. i.e. if: TH0 = 1F; TL0 = FF; This would correspond to 8191 in decimal (1x16^3 + 15x16^2 + 15x16^1 +15x16^0), which, if the timer runs at 12MHz would give me time of 8.2mS (rounded up) which i would like to display onto the screen. Is there an easier way of doing it using C code instead of using Assembly? I always find programming the 8051 much easier using C! I have looked in the code library but the example seems a little complicated for me? is there a simpler way?? any suggestions? |
Topic | Author | Date |
Getting the timers value into decimal | 01/01/70 00:00 | |
BCD | 01/01/70 00:00 | |
printf | 01/01/70 00:00 | |
Yes | 01/01/70 00:00 | |
whoops | 01/01/70 00:00 | |
8051 timers in 16-bit mode...reg | 01/01/70 00:00 | |
where to read, why not do | 01/01/70 00:00 | |
RTFM! | 01/01/70 00:00 | |
many ways![]() | 01/01/70 00:00 |