go away spammer

Author Topic: SerLCD from spark fun problems with Z8 Encore  (Read 3312 times)

0 Members and 1 Guest are viewing this topic.

Offline AsellithTopic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 648
  • Helpful? 9
  • "I'm a leaf on the wind. Watch how I soar"
    • CorSec Engineering
SerLCD from spark fun problems with Z8 Encore
« on: December 18, 2007, 05:20:17 PM »
I'm using the Z8 encore dev board for some testing and build a rig to display a test on the 16X2 LCD with a serLCD v 2.5. I downloaded the spec sheet and have tried several of the special commands to clear the display or set the character position. However none of them seem to work. I can send a string of test using printf or I can send a specific letter using the ascii code. However if I send it 0x7C and a command from the extended lcd commands list it doesn't work. I tried sending just the command and I usually get garbage. It works fine I just cant do any of the extended commands and not being able to set the cursor position or clear the display is making things difficult. Any ideas what I'm doing wrong. I level shifted the 3.3 volt uart to 5 volts and that seems to work great at 9600 baud because the printf function works great just not the special commands

I'd post code but I have butchered it so much trying different things it confuses me now let alone others  ;D

Jonathan Bowen
Jonathan Bowen
CorSec Engineering
www.corseceng.com

paulstreats

  • Guest
Re: SerLCD from spark fun problems with Z8 Encore
« Reply #1 on: December 18, 2007, 05:59:20 PM »
did you try with command 254(0xFE) first?

by the looks of it, the lcd module is a stand alone product which has its own command register, the cursor position and clear screen etc are part of this register. There is a PIC that has been attatched that also has a command register which is the 0x7c register this is used for controlling the communication speed, splash screen etc..

this is how to set the cursor position from the sheet you downloaded

1)determine the correct decimal position to move to

2)set bit 7 of that number to 1 e.g. 194

3)now transmit special serial character 254

4)finally transmit your cursor position number (194)

(page 3)

All of the extended lcd commands in that box would use 254(0xFE) to work aswell as the commands in the external link below it.

Offline AsellithTopic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 648
  • Helpful? 9
  • "I'm a leaf on the wind. Watch how I soar"
    • CorSec Engineering
Re: SerLCD from spark fun problems with Z8 Encore
« Reply #2 on: December 19, 2007, 11:25:42 AM »
Thanks just tested the code and it works fine had a little noob code error that the complier should have caught.

while(UARTstat = 0) isn't the same as while(UARTstat ==0)  ;D

Ok now to work on the SPI interface to my ADCs that will be the next phase of this project.

Jonathan Bowen
Jonathan Bowen
CorSec Engineering
www.corseceng.com

 


Get Your Ad Here

data_list