19200 Baud "Code"
John Board
Posts: 371
G'day,
I've just been trying to "talk" with the CMUCam, and am not quite sure how to hook up the serial comms, as I'm not quite familiar wit the BASIC Stamp. I've looked through the help guide, and I am not quite sure what to look for...
The serial needs to have the following settings:
19,200 Baud Rate See BM (Baud Mode) command to change after startup
1 Start Bit
8 Data Bits
1 Stop Bit See DM (Delay Mode) command to change after startup
No Parity/Sticky Bit
No Flow Control software (Xon (ASCII 17) / Xoff (ASCII 19)) or hardware (RTS/CTS)
The commands for the CMU can be found here: http://www.cmucam.org/attachments/download/636/CMUcam4-Command-List-102.pdf
I'm using the BS2PX module with the BOE.
Thanks,
John
I've just been trying to "talk" with the CMUCam, and am not quite sure how to hook up the serial comms, as I'm not quite familiar wit the BASIC Stamp. I've looked through the help guide, and I am not quite sure what to look for...
The serial needs to have the following settings:
19,200 Baud Rate See BM (Baud Mode) command to change after startup
1 Start Bit
8 Data Bits
1 Stop Bit See DM (Delay Mode) command to change after startup
No Parity/Sticky Bit
No Flow Control software (Xon (ASCII 17) / Xoff (ASCII 19)) or hardware (RTS/CTS)
The commands for the CMU can be found here: http://www.cmucam.org/attachments/download/636/CMUcam4-Command-List-102.pdf
I'm using the BS2PX module with the BOE.
Thanks,
John
Comments
You'll certainly be able to have the Stamp talk at 19.2K although experience suggests receiving at that speed might pose some challenges as the chip does not have a communication buffer. But, 9600 works really well.
If you look at the Help file in the programming environment, under SERIN, you'll see the parameters to choose baud, parity, stop bits.
If you talk to the camera from the programming port of the Stamp (pin 16), use the TRUE settings. If you are using a regular i/o pin, it will likely need to be the INVERTED mode.
Nothing needs to be done with the Start bit, it occurs by default in serial comms. Looks like you have 19.2K, 8N1 ( 19200 baud, 8 data bits, 1 stop bit).
If you haven't already tried the example in the CMU doc, I'd do that first just to make sure communication is happening.