PDA

View Full Version : Custom Characters



KoyJa
08-21-2005, 07:16 AM
STAMP BSP240
REV 1.4
Module 4x20 Serial LCD with Keypad Interface Stock#: 30058

Hey Guys,

I just hooked up the 4x20 to the never ending project and its working good. I had
to rewite some of the code from the LCD command becuase I need to use the SEROUT
command. I can write info to each line no problem and easily goto the next line
(Chris posted a note awhile back which showed how to insert CR at then end to automatically
go to the next line) :

SEROUT 9,240,[SEG_ON,SEG_ON,SEG_ON," FAIL HI",13,10] '13 n 10 = CR

Now Im tring to create Custom Characters. I have been through the docs from Orbits and I am using
the LCD create Character program from the Parallax website to get the HEX numbers. I tried
the following :

SEROUT 9,240,[78,$10,$00,$00,$00,$00,$00,$00,$00,13,10]

My understanding is (which is probally wrong ;) :
78 is the ASCII command to Define a CC ..... then I try to display
the 8 HEX numbers followed by CR. I have defined the value but how do
I get them to display?

Thanks

mikey

Koy Ja !

Chris Savage
08-21-2005, 08:00 AM
Mike,

·· One thing you're forgetting is the value 254 must be sent prior to any command.· For defining custom characters on the LK204-25-WB you would send 254, 78, c,·followed by the 8 bytes of the character data, which I believe is compatible with the LCD Character Creator software.··The c is to be replaced with a 0 - 7 to specify the slot that the character goes in.· A CR isn't needed for this command.

·· So to define the first custom character slot with a·torch you would send:

254, 78, 0, $04, $0A, $15, $0A, $04, $04, $04, $00


▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com (mailto:csavage@parallax.com)

KoyJa
08-21-2005, 09:11 AM
Thanks Chris !! Got it.
I was defining 254 but in a previos line ... I guess the LCD remembers the last Command number,
I was defining the Custom Char but I wast Displaying it :

SEROUT 9,240,[254]
SEROUT 9,240,[78]
SEROUT 9,240,[0,$04, $0A, $15, $0A, $04, $04, $04, $00,0] <<<< Last "0" is needed to output slot number chosen

Mikey

Koy Ja !

Chris Savage
08-21-2005, 09:16 AM
Mike,

·· I don't recall that last 0 being needed...The 0 at the beginning of the lin is supposed to set which slot the character goes in.· I can double check, as I do have that display, but I don't recall any extra 0.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com (mailto:csavage@parallax.com)