CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

the RTC NJU6355 interface

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Guest








the RTC NJU6355 interface
PostPosted: Fri Dec 02, 2005 1:07 am     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Dec 02, 2005 1:47 pm     Reply with quote

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








PostPosted: Sun Dec 04, 2005 1:25 am     Reply with quote

Thanx, its running !!
Guest
Guest







RTC lags
PostPosted: Sun Oct 15, 2006 2:15 am     Reply with quote

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
PostPosted: Sun Oct 15, 2006 2:18 am     Reply with quote

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








PostPosted: Sun Oct 15, 2006 2:22 am     Reply with quote

well this editor edits the my schematic here ! Smile
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







PostPosted: Sun Oct 15, 2006 2:49 am     Reply with quote

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

View user's profile Send private message

PostPosted: Sun Oct 15, 2006 2:11 pm     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group