Shop OBEX P1 Docs P2 Docs Learn Events
Serial with 8N2 instead of 8N1? — Parallax Forums

Serial with 8N2 instead of 8N1?

ktekxktekx Posts: 71
edited 2006-03-16 22:54 in BASIC Stamp
I have limited experiences with using the SERIN/SEROUT command and I've recently got a hold of several vacuum flourescent displays (used for cash register terminals). The good thing is, it is serially controlled at a changeable baud (9600 all the way to 1200), however, it says that it uses 8 data bits, no parity and _TWO_STOP_BITS_. Will this affect the stamp's serial communication between the two? Are there any modifiers to overcome this or is the Stamp fixed to 8N1?

I wish I could atleast test this out before asking, but the displays require a 7VAC source to power the vacuum flourescents (of which I've yet to find or make, any help on stepping down AC voltage or inverting circuits while I'm at it, hehehe??)

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2006-03-16 20:26
    The "two stop bits" basically means there's two bit-times of silence (minimum) between each set of RS-232 bits. I don't know how much time the stock BS2 puts between characters.

    If nothing else, you can send messages a character at a time, and let the additional time to interpret each SEROUT command act as your second stop bit. At 9600 baud, each stop bit is 1/9600 seconds, or 104 uSec. I believe it takes longer than that to interpret the SEROUT command.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-03-16 20:31
    I have a couple of really old IEE alphanumeric (not the matrix sort) VFDs that require "8N2" at 1200 and they work fine taking "8N1" from a BS1 and a BS2.· I can't recall where I read this, but the SEROUT bytes aren't all jammed right on top of each other; there's at least a bit's time between each (before the next Start bit) and this results in, effectively, 2 stop bits.
  • ktekxktekx Posts: 71
    edited 2006-03-16 20:35
    Thanks for the quick reply allanlane5, PJ Allen, I'll give it a try when i get the power supply going.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-03-16 22:32
    With the BS2 family you can insert pacing between characters -- this will be more than one bit (timing is in milliseconds), but will give the other end the breathing time it needs.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-03-16 22:54
    ktekx -

    Just to round out Jon's suggestion, here is the prototype SEROUT command:

    SEROUT Tpin {\Fpin}, Baudmode, {Pace,} {Timeout, Tlabel,} [noparse][[/noparse]OutputData]

    Note:

    Pace is an optional variable/constant/expression (0 - 65535) that determines the length of the pause between transmitted bytes. NOTE: Pace cannot be used simultaneously with Timeout.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
Sign In or Register to comment.