![]() |
![]() |
![]() |
|
|
|||||||
| General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion? |
|
|
Tools | Display Modes |
|
|
#1 (permalink) |
|
Can anyone advise if its possible to use a PIC to control a PTZ camera using RS485 and the Pelco-P or Pelco-D protocol.
I already have a dome camera connected to a DVR and all is working well although the DVR isn't capable of controlling things like focus, Infra red filter etc etc. I don't really want to buy a ready made controller as I intent to mount this in a wall next to the LCD monitor which currently views the DVR. I have seen a simple circuit somewhere that uses a PC RS232 port to control the camera using a MAX485 chip but ideally what I eventually build will be self contained and not rely on a PC. I have experience at PIC's but it is really limited to the basics, Flashing LED's & printing text onto an LCD etc. I would like some direction to a circuit which has already been designed for the purpose of controlling a PTZ using Pelco-P or D which I can modify to suit my needs. Thanks for reading... Paul.
__________________
When God was handing out the brains, I thought he said trains, so I asked for a small, slow one! |
|
|
|
|
|
#2 (permalink) |
|
Bump...
Sorry to seem persistant but can I ask if this hasn't been aswered because nobody knows or is it that I seem like I want it all done for me? Or just some other reason? I've looked around since posting this and cannot find a way to do this with a PIC, it seems there's plenty of software out there to run it from a PC and a RS232 port though. Thanks for any info!
__________________
When God was handing out the brains, I thought he said trains, so I asked for a small, slow one! |
|
|
|
|
|
#3 (permalink) |
|
It is probably because nobody is familiar with the protocol. A link to the protocol specification would be handy.
The electrical interface to an RS-485 bus is no real problem. Assuming the protocol is suited to using a UART, the only remaining issues are does the PIC have enough code space in the flash memory to run the protocol, and is there enough space in the register file for the data required for the application and the protocol.
__________________
We never have time to do it right; but we always have time to do it over. Last edited by Papabravo; 18th November 2008 at 11:44 PM. |
|
|
|
|
|
#4 (permalink) |
|
here is the link to pelco-p protocol
http://www.secumaster.com.tw/menu/Pelco-P.pdf I think a PIC can easily handle this protocol, in any case you could always use 18F series instead of a 16F series... thanks aa |
|
|
|
|
|
#5 (permalink) |
|
That wouldn't be too difficult to do in a PIC. In assembler it could be done in something like a 12F629. The limit would be the number of spare pins for buttons.
Using a USART would make life a bit easier, but there is a warning here when using a USART with RS485. The USART produces a stop bit which is a high level, and if there is nothing more to transmit, the output remains high. There is no level change at the end of the stop bit. However, the RS485 driver has to be disabled at the end of transmission, and there is nothing within the PIC that tell you when the stop bit has finished. On some more advanced PICs there is a bit that says when the stop bit finishes, but it happens too early. (3/4 or 15/16ths of the way through the stop bit). The result is that you have to time the stop bit in software and then disable the RS485 driver. You could look on PIClist, Microchip PIC for code that could help you but I think that you will have to do some programming yourself. If you can print text onto an LCD, then implementing the protocol won't be much more difficult. |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
|
|
||||
| Title | Starter | Forum | Replies | Latest |
| CCTV Music video on the cheap in UK | HarveyH42 | Chit-Chat | 1 | 31st May 2008 08:50 AM |
| Cctv Problem | angler | General Electronics Chat | 1 | 21st April 2008 10:16 PM |
| Help with PIR / IR / CCTV / VCR circuit | idris | Electronic Projects Design/Ideas/Reviews | 2 | 1st March 2004 03:30 PM |
| VIDEO SWITCH FOR CCTV. | margaret | Electronic Projects Design/Ideas/Reviews | 0 | 29th December 2003 04:02 AM |
| CCTV Zoom lens control | rdriver | Electronic Projects Design/Ideas/Reviews | 8 | 4th August 2003 07:37 PM |