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!
The PIC16F876A is only 28-pins while the PIC16F877A is 40-pins.
You should modify the code accordingly and place the crystal in its respective pins.
Please refer to the datasheet for the PIC16F877A.
My suggestion is, connect the D0-D7 to the PORTD, and the rest of the other R/S and E on other pins, like PORTA. Place a potentiometer for the VEE.
Connect the ds1307 to its respective I2C lines in the PIC16F877A which is SDK and SDA, pins 18 and 23.