Shop OBEX P1 Docs P2 Docs Learn Events
Strange serial input format to code ... suggestions please — Parallax Forums

Strange serial input format to code ... suggestions please

Chuck D.Chuck D. Posts: 3
edited 2006-05-19 12:47 in BASIC Stamp
I've been working with the BS2 for a few months and am working up a prototype of a bridge between two common marine electronics communications protocols: SeaTalk and NMEA-0183.

Per a reference on SeaTalk at http://www.thomasknauf.de/rap/seatalk1.htm#Ser, SeaTalk transmits
11 bits for each character:

# 1 Start bit (high)
# 8 Data Bits (least significant bit transmitted first)
# 1 Command bit, set on the first character of each datagram. Reflected in the parity bit of most UARTs. Not compatible with NMEA0183 but well suited for the multiprocessor communications mode of 8051-family microcontrollers (bit SM2 in SCON set).
# 1 Stop bit (low)

I'm curious if anyone has attempted to recieve and/or transmit characters with such non-standard data transmission schemes, whether reading and writing such characters is possible with SERIN/SEROUT (or something else), and if so, HOW??

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2006-05-18 19:49
    The Stamp series of devices can only handle 8 bit serial data. The MAX3110 UART is from Maxim, connects to the Stamp via an SPI interface and can handle 8 bits + parity. Have a look at its datasheet.
  • allanlane5allanlane5 Posts: 3,815
    edited 2006-05-19 00:09
    Well, what you're describing was created by the 8051 and compatible chips. It's basically 10 bit RS-232 -- where the 9th bit is 'set' to indicate the associated byte is an 'address' byte. The 8051 had built-in hardware that would generate an interrupt on that "9th bit", so the chip could safely ignore the non-address bytes (or pay attention to them if it HAD recieved the right address byte).

    But no, the BS2 is pretty limited in its RS-232 byte interpretation. 8N1, or 7E1 (8-data, no parity, 1 stop bit), (7-data, even parity, 1 stop bit). Okay, with inter-byte delays you can add 'stop' bits, but that's about it.

    Typically one would use a co-processor programmed for the right protocol to recieve this.
  • Chuck D.Chuck D. Posts: 3
    edited 2006-05-19 10:59
    Thank you for the replies ... the background info and recommendation on the MAX3110 are useful.
  • stamptrolstamptrol Posts: 1,731
    edited 2006-05-19 11:44
    Some recent experience with another "weird" protocol makes me want to try feeding that signal into the stamp set at 8N1.

    My incoming signal was 8Odd1 and the stamp just seems to ignore the parity bit and correctly decode the data.

    As long as that Command bit doesn't do anything, you should be able to get the data.

    Cheers
  • GadgetmanGadgetman Posts: 2,436
    edited 2006-05-19 12:47
    You may want to look at either the SX/B or the Propeller as these are much more flexible.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't visit my new website...
Sign In or Register to comment.