Shop OBEX P1 Docs P2 Docs Learn Events
115200 Baud wich basic stamp ? — Parallax Forums

115200 Baud wich basic stamp ?

Thomas-JThomas-J Posts: 7
edited 2009-09-28 23:43 in BASIC Stamp
wich basic stamp can i use to transmit bytes with 115200 Baud
Thomas

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2009-09-25 14:29
    I don't think any stamp transmits that fast. What are you trying to connect with?

    A BS2 only has 26 bytes of RAM, and 2K Bytes of eeprom. Why do you have to send so fast?
  • Thomas-JThomas-J Posts: 7
    edited 2009-09-25 15:07
    when i press a butten the basic stamp send a seriel signal to a Video player on rs232 . The video player understand only 115200 baud
  • vaclav_salvaclav_sal Posts: 451
    edited 2009-09-25 16:39
    It will send at that rate with lots of caveat.
    Basically you need a processor capable of outputting raw data in approximately 8 microseconds rate minimum. Than you have to build - “roll you own” serial “packet” (start bit, data, stop bit) at desired format. And at that speed you should have error checking / hand shaking included in your code.
    Lots of what will happen if… stuff.
    A processor build with standard 115200 baud rate or a dedicated external hardware to Parallax processor would be my choice.
  • Thomas-JThomas-J Posts: 7
    edited 2009-09-25 16:51
    "Store Front" Digital Signage Serial (RS-232) Interface Protocol:

    Serial Port Setting:

    Baudrate (Bps/Par/Bits) : 115200 8N1
    Hardware Flow Control : No
    Software Flow Control : No

    -Packet format-

    | Header (1 byte) | Length (2 bytes) | Command (1 byte) | Interval (2 bytes) | Path (Variable size) |

    The Header, Length and Command segments are mandatory. Interval and Path are only necessary for the INSERT command.

    Packet segment description:-

    Header: 1 byte
    Must be 0xFF.

    Length: 2 bytes
    Length of the data segment of the packet(Command + Interval + Path).

    Command: 1 byte
    INSERT 0x01 - Stop the current media and playback the new media file specified in this command. The playlist will continue to next item after playback has completed.
    NEXT 0x02 - Skip to next item in the playlist
    STOP 0x03 - Stop the Signage playback
    PAUSE 0x04 - Pause the media, only applicable for Video/Audio
    RESUME 0x05 - Resume from pause
    START 0x06 - Start Signage playback from stop state

    (For the INSERT command)
    Interval (in seconds): 2 bytes
    Video/Audio - Duration of clip playback. 0 will play the entire clip.
    Photos - Duration of photo display. 0 for the default photo interval.

    Path: Variable size
    Default Path - file:///opt/sybhttpd/localhost.drives/USB_DRIVE_DSS/dss/media
    Internal USB Root Path - file:///opt/sybhttpd/localhost.drives/USB_DRIVE_DSS/
    External USB Root Path - file:///opt/sybhttpd/localhost.drives/USB_DRIVE_B-1/

    Examples :

    Insert and playback file:///opt/sybhttpd/localhost.drives/USB_DRIVE_DSS/dss/media/sample.avi
    | 0xFF | 0x00 0x0D | 0x01 | 0x00 0x00 | 0x73 0x61 0x6D 0x70 0x6C 0x65 0x2E 0x61 0x76 0x69 |
    ''FF, 00, 08, 01, 00, 00, 31,2E, 6D, 34, 76
    0xFF, 0x00, 0x08, 0x01, 0x00, 0x00, 0x31,0x2E, 0x6D, 0x34, 0x76

    Play next item in the playlist
    | 0xFF | 0x00 0x01 | 0x02 |

    Stop playback
    | 0xFF | 0x00 0x01 | 0x03 |

    Pause playback
    | 0xFF | 0x00 0x01 | 0x04 |

    Resume playback
    | 0xFF | 0x00 0x01 | 0x05 |

    Start playback
    | 0xFF | 0x00 0x01 | 0x06 |
  • Thomas-JThomas-J Posts: 7
    edited 2009-09-25 16:58
    that the specs of my viedo player
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-09-25 17:06
    As long as the Stamp doesn't need to receive data at that rate, you should be able to get by using SEROUT on a BS2p, using a baudmode setting of 2. I'm able to receive data from a BS2p on Hyperterminal at this rate without errors. Measuring the baudrate on my scope, I get 115207, which is a lot closer than I thought it would be.

    -Phil
  • Thomas-JThomas-J Posts: 7
    edited 2009-09-28 13:57
    @phipi : b2p or b2px? what are the settings of 2.?

    Post Edited (Thomas-J) : 9/28/2009 2:04:34 PM GMT
  • Tracy AllenTracy Allen Posts: 6,662
    edited 2009-09-28 14:37
    On the BS2sx or BS2p, use baudmode setting 2. On the BS2px use 15:

    SEROUT 0, 2, [noparse][[/noparse]header, length1, length2, command, ... ] ' on 'sx or 'p

    SEROUT 0, 15, [noparse][[/noparse]header, length1, length2, command, ... ] ' on 'px

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • Thomas-JThomas-J Posts: 7
    edited 2009-09-28 19:00
    i want to use pin 4 for serout
    SEROUT 4, 2?
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-09-28 21:24
    Yup.
  • Thomas-JThomas-J Posts: 7
    edited 2009-09-28 23:43
    thx, i test it
    Thomas from Germany
Sign In or Register to comment.