Real time clock with LCD by using pic16f877a

Discussion about projects that used PIC Microcontroller, Hardware Interface, Programming Algorithm and etc......

Real time clock with LCD by using pic16f877a

Postby IsaacChuah90 » Mon Jul 18, 2011 1:52 pm

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: Real time clock with LCD by using pic16f877a

Postby shahrul » Mon Jul 18, 2011 7:49 pm

If using RTC with PIC16F877A, see this free code.
User avatar
shahrul
Professional
 
Posts: 812
Joined: Sat May 16, 2009 9:54 pm
Location: Selangor

Re: Real time clock with LCD by using pic16f877a

Postby IsaacChuah90 » Mon Jul 18, 2011 8:36 pm

Ok...so just use the microchip HI-TECH ANSI C will do right?Just follow the Lesson Mplab in one of your replied comment will right?The coding need to modify if I'm using 16 by 2 lcd instead of using 20 by 4 lcd?because the lcd you using is different with me.thanks for help.New to programming.hope you don't mind. :)
IsaacChuah90
Apprentice
 
Posts: 52
Joined: Mon Jun 06, 2011 7:35 pm

Re: Real time clock with LCD by using pic16f877a

Postby ober » Mon Jul 18, 2011 9:09 pm

Hi, the sample source code for all DIY has been verified, including the schematic. Many has use it and works fine.

A photo of your hardware would be useful.
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1486
Joined: Wed Apr 15, 2009 1:03 pm

Re: Real time clock with LCD by using pic16f877a

Postby IsaacChuah90 » Mon Jul 18, 2011 10:03 pm

Dear Ober Choo,
I connect all the components according to the schematic of the pr12,I just change the pic to pic16f877a instead of using pic16f876a but it can't work.Izit the coding problem or what?thanks for help.
IsaacChuah90
Apprentice
 
Posts: 52
Joined: Mon Jun 06, 2011 7:35 pm

Re: Real time clock with LCD by using pic16f877a

Postby shahrul » Mon Jul 18, 2011 11:01 pm

IsaacChuah90 WROTE:Ok...so just use the microchip HI-TECH ANSI C will do right?Just follow the Lesson Mplab in one of your replied comment will right?The coding need to modify if I'm using 16 by 2 lcd instead of using 16 by 4 lcd?because the lcd you using is different with me.thanks for help.New to programming.hope you don't mind. :)

The code for LCD 20X4 is same with LCD 16X2.
User avatar
shahrul
Professional
 
Posts: 812
Joined: Sat May 16, 2009 9:54 pm
Location: Selangor

Re: Real time clock with LCD by using pic16f877a

Postby kl84 » Tue Jul 19, 2011 5:07 pm

876A has less pins compare to 877A. Make sure all the pins defined in the software are correctly connected. Don't forget Config >> Select Device too.
User avatar
kl84
Amateur
 
Posts: 166
Joined: Thu Jul 08, 2010 12:14 pm

Re: Real time clock with LCD by using pic16f877a

Postby robosang » Tue Jul 19, 2011 8:57 pm

Many has also follow schematic and connect everything, but at the end found that the hardware is not exactly same as schematic.... like Allen once say, I follow the recipe and cook the cake, but the taste is not good, why? :D

So the picture of your board is critical. Otherwise I would suggest you to test the LED on your board, write a simple program to blink the LED. This is to ensure PIC is working.
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm

Re: Real time clock with LCD by using pic16f877a

Postby IsaacChuah90 » Tue Jul 19, 2011 9:57 pm

I m sure tat all the pins defined in the software are correctly connected according to the schematic shown in pr12 diy project.I connected my LCD and ds1307 rtc according to the schematic already but it still cant work.the lcd just got light and show nothing.Izit the source code of pr12 used in pic16f876a is different when used in pic16f877a?seeking for helps.Thanks!
IsaacChuah90
Apprentice
 
Posts: 52
Joined: Mon Jun 06, 2011 7:35 pm

Re: Real time clock with LCD by using pic16f877a

Postby shahrul » Tue Jul 19, 2011 10:16 pm

IsaacChuah90 WROTE:I m sure tat all the pins defined in the software are correctly connected according to the schematic shown in pr12 diy project.I connected my LCD and ds1307 rtc according to the schematic already but it still cant work.the lcd just got light and show nothing.Izit the source code of pr12 used in pic16f876a is different when used in pic16f877a?seeking for helps.Thanks!

Actually, coding for PIC16F876A is exactly same with PIC16F877A. If you follow same port for PIC16F876A into PIC16F877A, it's can working.

Since, we are not see your hardware, many expectation we can do.
1) Is that you use right crystal type?
2) Is that your PIC circuit working? To sure that, try to do very simple program like on/off LED.
3) When your PIC circuit working, is that your LCD circuit working? If not, try to check LCD connection or try change to another LCD.
User avatar
shahrul
Professional
 
Posts: 812
Joined: Sat May 16, 2009 9:54 pm
Location: Selangor

Next

Return to PIC Microcontroller

Who is online

Users browsing this forum: No registered users and 5 guests

cron