Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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: 148
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.

Latest threads

Back
Top