Shop OBEX P1 Docs P2 Docs Learn Events
Stamp2SX to LCD trouble — Parallax Forums

Stamp2SX to LCD trouble

ArchiverArchiver Posts: 46,084
edited 2000-10-03 14:07 in General Discussion
try $4054

okkie@m... wrote:
>
> I am trying to send strings to a 2x16 LCD but no luck. I have tried
> 2400 & 9600 Inverted and Non-inverted but still cant get it right. I
> tested the LCD on my PC and it works fine. If I use non-inverted I
> get a bunch of triangles otherwise I get a lot of garbage.
> Typical use:
> Serout 0,84+$4000,10,[noparse][[/noparse]"Hello"] for 9600
> serout 0,396+$4000,10,[noparse][[/noparse]"Hello"] for 2400
>
> Anyone have any Ideas?

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2000-10-02 12:22
    I am trying to send strings to a 2x16 LCD but no luck. I have tried
    2400 & 9600 Inverted and Non-inverted but still cant get it right. I
    tested the LCD on my PC and it works fine. If I use non-inverted I
    get a bunch of triangles otherwise I get a lot of garbage.
    Typical use:
    Serout 0,84+$4000,10,[noparse][[/noparse]"Hello"] for 9600
    serout 0,396+$4000,10,[noparse][[/noparse]"Hello"] for 2400

    Anyone have any Ideas?
  • ArchiverArchiver Posts: 46,084
    edited 2000-10-02 13:06
    At 10/2/2000 +0000 11:22 AM, you wrote:
    >I am trying to send strings to a 2x16 LCD but no luck. I have tried
    >2400 & 9600 Inverted and Non-inverted but still cant get it right. I
    >tested the LCD on my PC and it works fine. If I use non-inverted I
    >get a bunch of triangles otherwise I get a lot of garbage.
    >Typical use:
    >Serout 0,84+$4000,10,[noparse][[/noparse]"Hello"] for 9600
    >serout 0,396+$4000,10,[noparse][[/noparse]"Hello"] for 2400
    >
    >Anyone have any Ideas?


    The BS2-SX timings differ from the BS-2. Grab the BS-2SX document from the
    Parallax website [noparse][[/noparse]www.parallaxinc.com ] >> Documentation

    Extracted from that document:

    quote

    (See pages 319 – 329). Differences are in timing only, as follows:
    Range of serial output is 304.5 baud to 115.2K baud. To calculate proper
    bit period value for any baud rate, use the formula: Bit_Period =
    INT(2,500,000 / baud rate) – 20. Timeout value is in 0.4ms units. Use
    Revised Table I-6, below, for common baud modes.

    end quote

    Hope that helps.

    Regards,

    Bruce Bates
  • ArchiverArchiver Posts: 46,084
    edited 2000-10-02 13:50
    Thank you, will try it

    New timing for SX

    Data Speed Direct
    Baud Rate 8 data bits, 7 data bits,
    no parity even parity
    600 20530 28722
    1200 18447 26639
    2400 17405 25597
    4800 16884 25076
    9600 16624 24816
    19200 16494 24686
    38400 16429 24621

    Data Speed Through Line driver
    Baud Rate 8 data bits, 7 data bits,
    no parity even parity
    600 4146 12338
    1200 2063 10255
    2400 1021 9213
    4800 500 8692
    9600 240 8432
    19200 110 8302
    38400 45 8237








    --- In basicstamps@egroups.com, Bruce Bates <bvbates@u...> wrote:
    > At 10/2/2000 +0000 11:22 AM, you wrote:
    > >I am trying to send strings to a 2x16 LCD but no luck. I have tried
    > >2400 & 9600 Inverted and Non-inverted but still cant get it right.
    I
    > >tested the LCD on my PC and it works fine. If I use non-inverted I
    > >get a bunch of triangles otherwise I get a lot of garbage.
    > >Typical use:
    > >Serout 0,84+$4000,10,[noparse][[/noparse]"Hello"] for 9600
    > >serout 0,396+$4000,10,[noparse][[/noparse]"Hello"] for 2400
    > >
    > >Anyone have any Ideas?
    >
    >
    > The BS2-SX timings differ from the BS-2. Grab the BS-2SX document
    from the
    > Parallax website [noparse][[/noparse]www.parallaxinc.com ] >> Documentation
    >
    > Extracted from that document:
    >
    > quote
    >
    > (See pages 319 – 329). Differences are in timing only, as follows:
    > Range of serial output is 304.5 baud to 115.2K baud. To calculate
    proper
    > bit period value for any baud rate, use the formula: Bit_Period =
    > INT(2,500,000 / baud rate) – 20. Timeout value is in 0.4ms units.
    Use
    > Revised Table I-6, below, for common baud modes.
    >
    > end quote
    >
    > Hope that helps.
    >
    > Regards,
    >
    > Bruce Bates
  • ArchiverArchiver Posts: 46,084
    edited 2000-10-02 23:52
    The correct baudmode for a BS2-SX/9600 baud is $40F0. Substitute this
    for the baudmode in the example program ($4054) and you'll be fine.

    This is covered in more detail in an app note at
    www.seetron.com/bsx_tip1.htm . A list of app notes is at
    www.seetron.com/lcd_andex.htm .
  • ArchiverArchiver Posts: 46,084
    edited 2000-10-03 14:07
    Thank you, I seem to have solved the problem by using the table in
    the latest sx release notes. I included it in a previous post.
    Thank you


    --- In basicstamps@egroups.com, stamps@s... wrote:
    > The correct baudmode for a BS2-SX/9600 baud is $40F0. Substitute
    this
    > for the baudmode in the example program ($4054) and you'll be fine.
    >
    > This is covered in more detail in an app note at
    > www.seetron.com/bsx_tip1.htm . A list of app notes is at
    > www.seetron.com/lcd_andex.htm .
Sign In or Register to comment.