PR12 Real time clock

LED Blinking, Walking with Cytron Servo, Displaying RFID, Multi-function Mobile Robot......

PR12 Real time clock

Postby wci » Sun Apr 03, 2011 11:39 pm

Hi everyone,

i have built up the real time clock according to the schematic and component list in PR12 project set. I have also use the sample source code from PR12 project set as well.. however, the clock didn't run properly after i set the time.. it returned to 00:00:00 when i pressed the mode button after setting the day.. both software and hardware simulation are showing the same problem. i wonder why is it like that? Anyone can help? Appreciate it very much!
wci
Freshie
 
Posts: 4
Joined: Sun Apr 03, 2011 11:23 pm

Re: PR12 Real time clock

Postby joliza » Mon Apr 04, 2011 12:10 pm

wci WROTE:Hi everyone,

i have built up the real time clock according to the schematic and component list in PR12 project set. I have also use the sample source code from PR12 project set as well.. however, the clock didn't run properly after i set the time.. it returned to 00:00:00 when i pressed the mode button after setting the day.. both software and hardware simulation are showing the same problem. i wonder why is it like that? Anyone can help? Appreciate it very much!



Can you capture photos of the hardware and upload here. Might get some problem there.
joliza
Novice
 
Posts: 22
Joined: Mon Jun 22, 2009 10:56 am

Re: PR12 Real time clock

Postby wci » Wed Apr 06, 2011 9:27 am

I am using breadboard testing and it is messy. I have check many times on the connection. Basically i connected the circuit according to the schematic available in PR12 (http://www.cytron.com.my/usr_attachment ... ematic.pdf). Just that i am using PIC16F877A and i change the port for switches and rs and e pin for LCD display for convenience during hardware connection. And i didn't connect UIC00A Programmer Connector.. Hope to see your replies soon.. Thanks!
wci
Freshie
 
Posts: 4
Joined: Sun Apr 03, 2011 11:23 pm

Re: PR12 Real time clock

Postby yonghui » Wed Apr 06, 2011 5:31 pm

hi,

to little info from u. hardly for me to imagine wat happen to ur circuit.
at least some pictures. or more descriptive info on the circuit and problems. have u done any debug on it?

regards,
yh
thanks&regards,
yh
yonghui
Moderator
 
Posts: 732
Joined: Mon Sep 28, 2009 3:27 pm

Re: PR12 Real time clock

Postby wci » Wed Apr 06, 2011 8:17 pm

Ya.. it showed "Build successful!". I have 3 source codes: PR12.c, i2c.c and i2c_rtc.c. My header files are pic.h, i2c.h and i2c_rtc.h. My circuit schematic is shown as follows: http://postimage.org/image/5ylw7chw/
Please help me check and hope to see ur replies soon.. Thanks!
wci
Freshie
 
Posts: 4
Joined: Sun Apr 03, 2011 11:23 pm

Re: PR12 Real time clock

Postby Brian Griffin » Wed Apr 06, 2011 10:40 pm

You will need pull-ups for the SDA and SCL line. Put at least a 4.7k resistor which is connected to the +5V and each of the I2C connections.

Image

Please bear with me as my drawing skills isn't perfect and a bit too rushed.

Btw - due to the stray capacitance and loading effect on breadboards, the DS1307 and the crystal could not accurately keep the time after a few hours or days. You need to solder the DS1307, the crystal, the battery holder (and put battery inside after solder) all onto a Printed Circuit Board for a better timekeeping.
PIC - UIC00B from Cytron (replacement for my broken PICKit 2), Pickit 3, MikroC for PIC
dsPIC - MikroC for dsPIC, mikromedia board (dsPIC33)
AVR - AVR Dragon
Parallax - Prop tool
User avatar
Brian Griffin
Enthusiast
 
Posts: 403
Joined: Mon Jan 17, 2011 9:36 am

Re: PR12 Real time clock

Postby wci » Thu Apr 07, 2011 12:27 am

Thanks.. I have done it, but the problem is still the same.. is it related to programming problem?
wci
Freshie
 
Posts: 4
Joined: Sun Apr 03, 2011 11:23 pm

Re: PR12 Real time clock

Postby ober » Thu Apr 07, 2011 10:23 pm

User avatar
ober
Moderator
 
Posts: 1486
Joined: Wed Apr 15, 2009 1:03 pm

Re: PR12 Real time clock

Postby IsaacChuah90 » Mon Jul 18, 2011 11:50 am

Hi guys.I'm using pic16f877a instead of using pic16f876a,and I connect all the components including real time clock and LCD according to the schematic shown in pr12,the LCD can't show the time,it just show nothing.and I programmed the sample code inside the pic16f877a which include c file and hex file from pr12.it can't work..seeking for help.thanks!!!
IsaacChuah90
Apprentice
 
Posts: 52
Joined: Mon Jun 06, 2011 7:35 pm

Re: PR12 Real time clock

Postby yonghui » Tue Jul 19, 2011 11:05 pm

hi,

did u recompile the project for PIC16F877a with the correct device selected in MPLAB to get a new HEX for ur PIC?
the HEX for 876a cant fit 877a


regards,
yh
thanks&regards,
yh
yonghui
Moderator
 
Posts: 732
Joined: Mon Sep 28, 2009 3:27 pm

Next

Return to DIY Project Set

Who is online

Users browsing this forum: No registered users and 9 guests

cron