Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > General Electronics Chat


General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion?

Reply
 
Thread Tools Display Modes
Old 12th February 2005, 10:24 PM   (permalink)
Default Interfacing real time clock

hello!
I have a PCF8583 Real time clock connected to a pic 16f877, I want to do 2 things with it.

1. display hours, minutes, seconds
2. use it as a counter to count time between pulses (for a speedometer)

From reading the datasheet I could not determine if it can do both of this at once, or not.

Also does anybody have code examples in JAL I searched google but found none.
goodpickles is offline   Reply With Quote
Old 13th February 2005, 09:35 AM   (permalink)
Default Re: Interfacing real time clock

Quote:
Originally Posted by goodpickles
hello!
I have a PCF8583 Real time clock connected to a pic 16f877, I want to do 2 things with it.

1. display hours, minutes, seconds
2. use it as a counter to count time between pulses (for a speedometer)
I see no problem doing that, you could either do them both by polling, both by interrupts, or one of each.

As I recall you can set the PCF8583 to output a pulse every second on one of the pins, you could use that to signal when the next update is needed.

Or you could simply read the clock during the half of the pulse you're not reading - if you're measuring the LOW part of the pulse, use the HIGH part to read the clock.

You might like to consult the (very old) MicroChip datasheet for a frequency counter, it does much of what you want - while multiplexing LED displays at the same time. There's a later modified version (not from MicroChip) which uses an LCD display instead.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes




All times are GMT. The time now is 08:49 AM.


Electronic Circuits  |  Electronics Wiki
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.