I have working circuit with 8051-micro and DS1307 rtc.
Every second it transmits time and date via serial port in the ASCII format.
What I need to do is to add 0.1s time base so it sends time and date not every secon but every 0.1s and time format should look like this: hh:mm:ss.x
Where can I have this 0.1s from?
1. Generate an edge triggered external interrupt using the one sec. clock output of RTC.
2. In the interrupt routine,
- Read the current time and send out as hh:mm:ss.0 and store the time ,
- Set up the Timer 0 for 0.1 sec interrupt.
3. In the timer0 interrupt routine,
- Increment the storage location of 0.x sec and also send out the full time data after incrementing.
- If the 0.x sec. location reaches 0.9, disable timer 0 interrupt and send out the full time data.