I'm attempting to use a Propeller to control the zoom function of a Pelco-D camera via an RC radio. My code is based on Duane Degn's RcReceiver6Demo121116a Object. I have the Prop1 reading and displaying the pulsewidth correctly. The CASE command is used to increase the speed of the zoom the further the joystick is moved from the (center) deadzone. This changes the zoom direction and zoom speed bytes.
I will use a SN75176 Differential Bus Transceiver chip between the Prop1 and the camera per this document: rs485Communication.pdf
I previously got this working with a PIC 12F683 using a SEROUT command, but now want to use the Prop1. The PIC used one pin to enable/disable communication, and one pin to transmit the data to the SN75176.
For the Prop1, I have the following circuit connections
SN75176 pin 6 to camera RS485+
SN75176 pin 7 to camera RS485-
SN75176 pins 2&3 to Prop1 pin 0 (enable/disable)
SN75176 pins 1&4 to Prop1 pin 1 (transmit)
Each Pelco command requires I send 7 bytes of hex data that includes a checksum. Example: Camera on = $FF,$02,$88,$00,$00,$00,$8A I have figured out all of the 7 byte commands so I don't have to do real-time checksum calculations.
The camera requires 2400 baud, No parity, true format.
I cannot get any response from the camera with the Prop1. I've tried the following code (using the FDS Object) but I'm not sure how to set the fds.start mode parameter.
RC_to_PELCO_Converter5_May_2013 - Archive [Date 2013.05.05 Time 18.04].zip
I also looked at the BS2_Functions Objec SEROUT Method but I'm not sure if I should use the SEROUT_CHAR Method or the SEROUT_STR Method to send 7 bytes.
Can anyone provide an example of a way to send those 7 byte commands.