Hi snood,
Isn't "LCDOUT" a reserved word in PBP? Don't know if that might cause problems.
Arch
Hi snood,
Isn't "LCDOUT" a reserved word in PBP? Don't know if that might cause problems.
Arch
well i have just actually re-written that for the purpose of the forum, i dont currently have access to my one with the problem... LCDOUT is just what i called it here, it's called "screen" on my actual version, either way, it's not the screen i'm having trouble with, thats working fine, it's just not displaying the "correct" information from the RTC.. i just read in another post something about when the DS1307 is brand new you have to do something to it to make it work, can someone explain this to me? as the above code is being run on a fresh 1307.Originally Posted by Archilochus
thankyou
Paul
Snood,
if you search the Forum for "DS1307" you'll find a number of examples.
(be honest, you haven't really searched)
Do you have 4k7 Pullup Resistors on SDA and SCL ?
For additional Information see: DataSheet
regards
Ralph
_______________________________________________
There are only 10 types of people:
Those who understand binary, and those who don't ...
_______________________________________________
ogg dear i never noticed the 4k7 resistor... how vital is this to have? i connect the resistor to the SDA only according to the datasheet, what does the other end of the resistor connect to? +5v?
and yes ive searched for 1307.
paul
Hi Snood,
Ohh... yeah, those pullups are important! Hook them from the SDA and SCL lines to your positive rail that powers the PIC and 1307.
Here's a bit from the data sheet about starting up a 'new' 1307:
"Bit 7 of register 0 [seconds] is the clock halt (CH) bit. When this bit is set to a 1, the oscillator is disabled. When cleared to a 0, the oscillator is enabled."
Since you set 'seconds' to 0, the clock should be enabled, assuming the the I2C write command is working properly.
Arch
No pullUp, No SuccessOriginally Posted by snood
what else could you connect a PulUp to?Originally Posted by snood
Well, then everything should be pretty clear.Originally Posted by snood
(if you have taken the time to read through the threads)
Last edited by NavMicroSystems; - 24th April 2005 at 00:25.
regards
Ralph
_______________________________________________
There are only 10 types of people:
Those who understand binary, and those who don't ...
_______________________________________________
please..... i didnt come here to be put down. can you explain to me what the purpose of a pullup resistor is and why it is needed in this instance.
Snood
edit:
also... as far as initialising the chip goes.... apparently i have to change bit 7 of the seconds byte to 0 for it to "turn on"..... corect me if i'm wrong but surely i'm already doing this by writing "0" as the byte?
Snood
Last edited by snood; - 24th April 2005 at 11:28.
OK, I'll try it in brief:Originally Posted by snood
A PullUp is required when you have an output pin that is open Drain (or open Collector)
An open collector output is "open" if not set "LOW"
The PullUp pulls this open Pin "HIGH"
The SDA pin on an I2C device is such an open Drain output as it is bi-directional.
Melanie has written an excellent example for the DS1307, see: MN1307.txt
Another thread about RTC's with a lot of useful information can be found here
Take some time to read it from the beginning, you can really learn a lto from it.
regards
Ralph
_______________________________________________
There are only 10 types of people:
Those who understand binary, and those who don't ...
_______________________________________________
Bookmarks