RS485 for PTZ camera


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2008
    Posts
    8

    Default RS485 for PTZ camera

    My PTZ camera controller has died and I'm trying to design and build one myself. It uses a Pelco D protocol (2400 baud, 1 start, 8 data, no parity, and 1 stop) with RS485. Pelco D requires 7 bytes to be sent. The camera does not respond back so the transmission is Simplex. This is the first time I ever tried to use serial communication with a microcontroller, so I have no clue what I'm doing. There's only 20 PTZ commands that I'll be using. Each of which has 7 bytes of data. I'm using a MAX1487 with either a PIC16F84 or 16F627 because I have them in my parts cabinet.

    My questions are first, can I use either of these PICs for this application? And second, can this be done without using any serial ports on the Microcontroller? Since I'm only using two port pins on the PIC, I can control the transmission manually without using any UARTs. I know this will lead to timing issues which I can resolve with some trial and error.

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,517

    Default Re: RS485 for PTZ camera

    Hello,
    The SEROUT2 command is a bitbanged routine for async communications. It allows you to use "any" pin on the PIC as your "serial port" but it has the disadvantage of "blocking" the processor while it's doing its thing - which doesn't seem to present a problem in your case - and it allows you to set the number of databits, ie 7 in this case.

    Given the two PICs you have, definitley go for the 627.

    /Henrik.

  3. #3
    Join Date
    Jan 2008
    Posts
    8

    Default Re: RS485 for PTZ camera

    Thanks henricolsson. Now I know I can use the parts I have. All I need to do now is write code for the PIC16F627 using the SEROUT2 command and sellect any pin as my output. You've just simplified my project. Thank you again.

Similar Threads

  1. Replies: 2
    Last Post: - 15th September 2011, 11:09
  2. camera delays
    By MOUNTAIN747 in forum General
    Replies: 4
    Last Post: - 27th January 2010, 07:16
  3. Camera with PIC chip
    By The Master in forum Off Topic
    Replies: 5
    Last Post: - 1st July 2008, 15:28
  4. Digital Camera Controller
    By Tom Gonser in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 25th October 2005, 02:08
  5. Camera interfacing PC help
    By Koraki in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 13th September 2005, 18:49

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts