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.
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/
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.
Comments
A BS2 only has 26 bytes of RAM, and 2K Bytes of eeprom. Why do you have to send so fast?
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.
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 |
-Phil
Post Edited (Thomas-J) : 9/28/2009 2:04:34 PM GMT
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
SEROUT 4, 2?
Thomas from Germany