Let's Make Robots!

PICAXE and LCD

I have looked over CtCs post regarding similar issues with his LCD, but still can get mine to budge. I was hoping to get some guidance on my issue. The issue being I can't get the LCD to work or interface with my PICAXE. Like Ctc, I am using the serial backpack from SparkFun. Here is my code:

pause 1000
setfreq m8

pause 2000                        
serout 1,T9600_8,(124, 4) 'Sets 20 char (3)    |
pause 200                        
serout 1,T9600_8,(124, 6) 'Sets 4 line (5)    |


pause 1000
serout 1,T9600_8,(0x7c, 128)    'Sets backlight full on (128-157 '128 is full on

pause 1000
serout 1,T9600_8,(254, $01) 'Clear Screen


main:

    pause 200
    serout 1,T9600_8,(254, 128)    'Sets line 1 position 1
    pause 200
    serout 1,T9600_8,("line 1")
   
    pause 200
    serout 1,T9600_8,(254, 192)    'Sets line 2 position 1
    pause 200
    serout 1,T9600_8,("line 2")

goto main

 

If I turn the 10k trim pot on the back to adjust the contrast, for a moment I see "blocks", but not text. Any clues?

AttachmentSize
photo.jpg142.85 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

The LCD was trash. I got a new LCD and LCD backback today, used the original code and everything works fine.

Thanks to all for your assistance.

Pin 7 is the serial pin. Leg 7, which I am using, is out 7.
Shouldn't you be using the serial pin for the serial communications? Or, can you set up any I/O pin as a serial pin?  Check CTC's code in the post you referenced above; he is using the serial pin 7.  Also, did you test the last bit of code I posted?
Yep, you can send serial data out of any pin. I did try the last chunk of code, no go, but thanks.

When you send the command to change the backlight is that working?  If so then we know at least that you are setup correctly for serial.  I'm working this straight from the SparkFun and PicAxe datasheets as I don't have a PicAxe to test out.  Sorry if I'm not being much help to you.

Don't let yourself get frustrated.  As soon as we figure out all the stuff that doesn't work all that is left are those that do work.

Yes the backlight works and as I mentioned, I can flash it in a loop. I was assuming that meant baud rates were correct, etc. Just not sure though.
Assuming that your not using a picaxe 28X1 with V4 firmware then have a break and work on something else for a while. Like CTC you'll get there eventually. Double check all your connections and supply voltages.

Using a 28x1 with fireware A.0

Time for a break, time to dip into I2C. Got a new compass module to play with!!

Firmware A.0 ? Maybe you should order (or find) an A.3 or A.5, while you play with you compass.

8ik

So I take it there is no way to upgrade the firmware?

A.3 is the latest? Is there somewhere I can see the latest fireware releases?