Shop OBEX P1 Docs P2 Docs Learn Events
BS2SX and LCD display — Parallax Forums

BS2SX and LCD display

ArchiverArchiver Posts: 46,084
edited 2000-07-14 03:37 in General Discussion
Hi everybody,

I'm a new Stamp user from Belgium.
I try to interface a BPI-216 LCD module (from Scott Edwards) on a
BS2SX, but I get very strange results.
It looks like the LCD cannot recognize the commands I send.
The Clear command (characters 254 1) does not work, and when I send a
65 (ASCII code for 'A'), I get something like a funny japanese
character.
The self test of the LCD module is working fine.
Can anybody help me ?
Thanks in advance (and sorry for my english, but I can't find a lot
of people speaking english here !).
Phil.

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2000-07-13 23:37
    The BS2-SX uses different baudmode values with the Serout instruction
    than the original BS2. The BPI-216 example programs are written for
    the BS2, so they require a small change:

    Change $4054 to $40F0 (for 9600 bps)
    -or-
    Change $418D to $43FD (for 2400 bps)

    Depending on the program you're trying to run, the baudmodes will
    either be in a constant definition (like "N9600 CON $4054") or used
    directly in a Serout instruction.
  • ArchiverArchiver Posts: 46,084
    edited 2000-07-14 03:37
    Phil,
    Well it would help if you could provide some source code, I have the same
    LCD, here is a very simple program to test the LCD. Simply download it to
    your stamp, but note the code is for a BSII and not a BS2SX but I don't
    think there will be a problem (well I hope not). Ok here is the code...

    'LCD Test Program for the BSII
    N9600 con $4054 'Baudmode for 9600 bps inverted
    I con 254 ' Instruction prefix value
    CLR con 1 ' LCD clear-screen instruction
    LINE2 con 192 ' Address of 1st char of 2nd line
    LCD con 0 ' Pin LCD is connected to
    ' Don't forget to change the pin number

    pause 1000
    serout LCD,n9600,[noparse][[/noparse]I,CLR]
    pause 1 ' Clear screen before program starts
    serout LCD,n9600,[noparse][[/noparse]"Testing"]
    serout LCD,n9600,[noparse][[/noparse]I,LINE2,"LCD"]
    END
    ' End test program



    If the LCD is working you should see on the first line "Testing" and on the
    second line "LCD". Let us know if that works, if not we can go from there.
    Hope this helps.

    Chris Shuster

    >From: derennep@s...
    >Reply-To: basicstamps@egroups.com
    >To: basicstamps@egroups.com
    >Subject: [noparse][[/noparse]basicstamps] BS2SX and LCD display
    >Date: Thu, 13 Jul 2000 20:43:20 -0000
    >
    >Hi everybody,
    >
    >I'm a new Stamp user from Belgium.
    >I try to interface a BPI-216 LCD module (from Scott Edwards) on a
    >BS2SX, but I get very strange results.
    >It looks like the LCD cannot recognize the commands I send.
    >The Clear command (characters 254 1) does not work, and when I send a
    >65 (ASCII code for 'A'), I get something like a funny japanese
    >character.
    >The self test of the LCD module is working fine.
    >Can anybody help me ?
    >Thanks in advance (and sorry for my english, but I can't find a lot
    >of people speaking english here !).
    >Phil.
    >
    >
    >
    >
    >
    >
    ________________________________________________________________________
    Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
Sign In or Register to comment.