| ??? 02/28/02 21:33 Read: times |
#20284 - RE: Basic Question on 13 and 16 bit timers |
Bits are numbered 0 through 7
7 6 5 4 3 2 1 0 with 0 the least significant bit. In the text you quoted it states that it is using bits 0 through 4 for TLx which is five bits so you can count to 31. The other three bits (5, 6 & 7) are the ones that are not used. Timers count up and "Overflow" to 0 when they reach their maximum value. This sets a flag (interrupt) that can be trapped and used to control events. If you do not stop the counter it just keeps counting up again. A 16 bit timer then can count to 2^16 or 65536 (65K)maximum. Timers are initialized by setting them to a calculated value (2's complement of the count needed). The value is determined by the machine cycle frequency. Generally this means that you need to do several counts for longer periods. See the tutorial on the software real time clock which does a fair job of explaining timing. Let me know if this just confuses you more. Larry |
| Topic | Author | Date |
| Basic Question on 13 and 16 bit timers | 01/01/70 00:00 | |
| RE: Basic Question on 13 and 16 bit timers | 01/01/70 00:00 | |
| RE: Basic Question on 13 and 16 bit timers | 01/01/70 00:00 | |
| RE: Basic Question on 13 and 16 bit timers | 01/01/70 00:00 | |
| RE: Basic Question on 13 and 16 bit timers | 01/01/70 00:00 | |
| RE: Basic Question on 13 and 16 bit timers | 01/01/70 00:00 | |
RE: Basic Question on 13 and 16 bit timers | 01/01/70 00:00 |



