| ??? 01/14/04 09:28 Read: times |
#62516 - RE: Creating a 1 second timebase Responding to: ???'s previous message |
The low byte of your reload value is zero. When the interrupt is flagged the low byte will be zero. This means that you don't need to reload the low byte in your ISR, or stop the timer during the reload. Just reload the high byte. This will give you timing as accurate as can be achieved with your oscillator.
You need to be sure that the interrupt cannot be 'locked out' for too long for this scheme to work. This is best achieved by making the timer0 interrupt the *only* interrupt set to the highest priority level and ensuring that the interrupt is only disabled for the minimum length of time in your main program when reading the official_time variable. |
| Topic | Author | Date |
| Creating a 1 second timebase | 01/01/70 00:00 | |
| RE: Creating a 1 second timebase | 01/01/70 00:00 | |
| RE: Creating a 1 second timebase | 01/01/70 00:00 | |
| RE: Creating a 1 second timebase | 01/01/70 00:00 | |
| I've read the tutorials, the spec sheets | 01/01/70 00:00 | |
| RE: I've read the tutorials, the spec sheets | 01/01/70 00:00 | |
| RE: I've read the tutorials, the spec sheets | 01/01/70 00:00 | |
| RE: Creating a 1 second timebase | 01/01/70 00:00 | |
RE: Creating a 1 second timebase | 01/01/70 00:00 |



