Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Sending data every 0.1s in circuit with 8051 and DS1307

Status
Not open for further replies.

DrWhoF

Advanced Member level 1
Joined
May 6, 2005
Messages
402
Helped
24
Reputation
48
Reaction score
11
Trophy points
1,298
Activity points
4,388
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?
 

Re: 8051+DS1307+0.1s

Hi,
You can do as follows:

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.

Regards,
Laktronics
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top