View previous topic :: View next topic |
Author |
Message |
Guest
|
the RTC NJU6355 interface |
Posted: Fri Dec 02, 2005 1:07 am |
|
|
Hi,
Im running the example program provided for the RTC NJU6355 (EX_RTC) Do i need to connect a level shifter (MAX232) between the data pin of RTC and pin B0. my connections at the moment are all directly connected to the four portb pins. Rest are vdd and vss. Plz suggest |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Fri Dec 02, 2005 1:47 pm |
|
|
No level shifter is required. You should be running the NJU6355 and
your PIC at the same Vdd voltage. (I assume it's 5 volts). |
|
|
Guest
|
|
Posted: Sun Dec 04, 2005 1:25 am |
|
|
Thanx, its running !! |
|
|
Guest Guest
|
RTC lags |
Posted: Sun Oct 15, 2006 2:15 am |
|
|
well pcm programmer, the voltages arent equal. This is because i have a circuit with the battery backup to retain the RTC time setting incase of ext. power loss. two diodes, resistance of 470 ohms and a nicad recharageable batt 3.6v are visible in the schematic.
Infact i have problem and the time setting tend to lag. can u find any problem
--------/\/\/\/--------|<5v>|-------- VDD of nju6355
|
---------
3.6v ---
Nicad batt ---------
---
|
|
GND |
|
|
Guest Guest
|
RTC lags |
Posted: Sun Oct 15, 2006 2:18 am |
|
|
well pcm programmer, the voltages arent equal. This is because i have a circuit with the battery backup to retain the RTC time setting incase of ext. power loss. two diodes, resistance of 470 ohms and a nicad recharageable batt 3.6v are visible in the schematic.
Infact i have problem and the time setting tend to lag. can u find any problem
--------/\/\/\/--------|<5v>|-------- VDD of nju6355
|
+ve batt term
-ve terminal gnded |
|
|
Guest
|
|
Posted: Sun Oct 15, 2006 2:22 am |
|
|
well this editor edits the my schematic here !
heres the description: the 7805 regulator supplies 5v to a diode which connects to a resistance. The resistance then goes to +ve terminal of the battery as well as to another diodes +ve terminal. this diode then goes
to the nju's vdd pin. the -ve terminal of the battery is gnded |
|
|
guest Guest
|
|
Posted: Sun Oct 15, 2006 2:49 am |
|
|
i find out that the rtc counts 5 second less every 15 seconds with this arrangment. can anybody suggest a possible solution ??? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sun Oct 15, 2006 2:11 pm |
|
|
Quote: |
The voltages arent equal. This is because i have a circuit with the
battery backup to retain the RTC time setting incase of ext. power loss.
two diodes, resistance of 470 ohms and a nicad recharageable batt 3.6v |
If you use Schottky diodes such as the Philips BAT85, the voltage
drop will be much less than if you use a silicon diode.
http://www.nxp.com/acrobat/datasheets/BAT85_4.pdf
A typical silicon diode such as a 1N914A, will have a much higher drop.
I tested this just now, by putting a low current through each diode and
measuring the voltage drop. I tested each one at 100ua and 10ua.
Code: |
Diode Vf @ 100 ua Vf @ 10 ua
1N914A 0.51v 0.41v
BAT85 0.16v 0.11v
|
The NJU6355 data sheet doesn't really give the operating current when
it's using the i2c bus. (At least, I don't think it does). The data sheet
says the "operating current" is 4ua at 5v. That must really be the
battery backup current.
Anyway, the point of all this is that if you use Schottky diodes, your
power supply voltage of +5v would only drop to 4.84v (or higher)
at the Vdd pin of the NJU6355.
---------------
With respect to incorrect time-keeping, this is usually caused by
improper crystal selection (i.e., the wrong part number) or by
noise being coupled into the crystal circuit.
NJR has two appnotes:
http://www.njr.com/pdf/appnotes/NJU6355_Application_Note.pdf
http://www.njr.com/pdf/appnotes/NJU6355ApplicationNote.pdf
Maxim/Dallas has many appnotes on how to make RTC's work properly.
These may help you more:
Crystal Considerations with Dallas Real-Time Clocks
http://pdfserv.maxim-ic.com/en/an/AN58.pdf
Read the section on Crystal Layout Guidelines
Design Considerations for Dallas Semiconductor Real-Time Clocks
http://pdfserv.maxim-ic.com/en/an/AN504.pdf
Quote: | I find out that the rtc counts 5 second less every 15 seconds with this arrangment. |
However, this is so grossly wrong that my guess is that the crystal
is completely wrong for the circuit, or the voltages are way too low
(either normal Vdd and/or battery backup), or maybe the battery
backup is not really connected.
----------------
Edit:
OK, forget all of this because I just saw your other thread
and it looks like it's your application code that is the problem. |
|
|
|