Controlling PTZ Camera using mcu

Discussion in 'Embedded Systems and Microcontrollers' started by crazyengineer, Dec 5, 2012.

  1. crazyengineer

    Thread Starter Member

    Dec 29, 2010
    So for a part time job, I have to control a camera using a pic microcontroller. I was reading how to control a PTZ camera using rs 485. Although I ready now that I need to get a Max485 chip to allow the pic to do serial communication with the camera, I'm still a little confused on how to send the serial command.

    For example, in order to move the camera up, it must receive a message 0x02012800002b (see page 5). So do I have write the following for PIC in order for the pic to tell the camera to move up?
    Code ( (Unknown Language)):
    2. putcUSART(0x2b);
    3. putcUSART(0x00);
    4. putcUSART(0x00);
    5. putcUSART(0x28);
    6. putcUSART(0x01);
    7. putcUSART(0x02);
  2. Sensacell

    Senior Member

    Jun 19, 2012
    Just reverse the order of the bytes.