View Full Version : Using a bs2 to control a hitachi block camera

10-04-2008, 12:59 AM
Im trying to get the bs2 to send a command to a·hitachi block camera
to get it to zoom. The hitachi block camera specs: 4800bps baud rate, 8 data
bits,1 stop bit,·even parity. The cameras communication data·consists of 8 ascii characters(8bytes)·The command im trying to send to the camera is :WFCBB99. I found the corresponding numbers for each of the ascii characters. When i·DEBUG 58, 87, 70, 67, 66, 66, 57, 57··· in the debug window i see :WFCBB99, which is what i want to send to the camera. But when i SEROUT 1, 8380, [58, 87, 70, 67, 66, 66, 57, 57] my camera doesnt zoom. I've tried a number of different ways and a number of different baud rates and nothing seems to work.

' {$STAMP BS2}
' {$PBASIC 2.5}


SEROUT 1,8380,[58,87,70,67,66,66,57,57]

Mike Green
10-04-2008, 01:07 AM
The information you've posted looks correct. There must be something about the camera's needs that you're missing.
You'll need to provide a manual or some kind of detailed datasheet that describes how to talk to the camera.

By the way, you can also write your statement as: SEROUT 1,8380,[":WFCBB99"]

10-04-2008, 01:57 AM
is my baud rate correct??? i used the baud rate for 7bit, even parity, 4800bps...... but the camera is 8bit, even parity, 4800bps

Mike Green
10-04-2008, 02:43 AM
It's very unusual to have a device with 8 data bits and a parity bit (for 9 bits total). They exist, but they're very rare. Most likely what they mean is a total of 8 bits per data frame of which one is an even parity bit and 7 are data bits. If you really have a 9 bit data frame, you won't be able to control it directly with a Stamp.

Please delete your duplicate message. Use the X icon in the right hand corner of the message window.

Phil Pilgrim (PhiPi)
10-04-2008, 02:56 AM
If the camera is RS232 compatible, the data will be inverted. You could try adding 16384 to your baud rate to invert the bits.


Chris Savage
10-07-2008, 01:17 AM

Your duplicate thread on this subject was removed. Please post messages on a subject only once in the forums.

Chris Savage
Parallax Engineering