Shop OBEX P1 Docs P2 Docs Learn Events
Custom Characters — Parallax Forums

Custom Characters

KoyJaKoyJa Posts: 17
edited 2005-08-21 01:16 in BASIC Stamp
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,[noparse][[/noparse]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,[noparse][[/noparse]78,$10,$00,$00,$00,$00,$00,$00,$00,13,10]

My understanding is (which is probally wrong [noparse];)[/noparse] :
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 !

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-08-21 00:00
    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
  • KoyJaKoyJa Posts: 17
    edited 2005-08-21 01:11
    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,[noparse][[/noparse]254]
    SEROUT 9,240,[noparse][[/noparse]78]
    SEROUT 9,240,[noparse][[/noparse]0,$04, $0A, $15, $0A, $04, $04, $04, $00,0] <<<< Last "0" is needed to output slot number chosen

    Mikey

    Koy Ja !
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-08-21 01:16
    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
Sign In or Register to comment.