Code works on simulator but not on real PIC

Status
Not open for further replies.

gregmcc

Member
I've been fiddeling around with Nigel's LCD tutorial and got it going on Oshonshoft's simulator as well as on a real PIC. (with a 1x16 LCD)

I've now changed the PIC to a 16f877 and the LCD works on the simulator - it prints out the word "Testing". I've setup a loop so that it only displays the 1st line from the code.

If I program the PIC now however, it only prints out "esting" - missing the "T"

I thought it might be a delay problem but I've tried messing around with various values - no joy.

Can anyone offer any suggestions. I've posted the code I'm using.
 

Attachments

  • lcd.asm
    4.8 KB · Views: 149
You aren't going through the proper initialisation sequence. See the attached for details.

Mike.
 
Last edited:
Thanks - nice flowchart. I'll relook at my code tonight and compare it to the chart.

I'll post the results.
 
gregmcc said:
Code:
    __CONFIG 0x3F7D

The Watch Dog Timer is enabled.
Personally I like using the config labels, that make your code more readable by others (as far as the configuration fuses are concerned).
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…