phtsai
Newbie level 1
![Newbie level 1](/styles/images/ranks/alevel1.gif)
I try to using the 8051 to decode the serial data send from a PTZ keyboard (using Pelco D / P protocol)
The data transmitted from the keyboard will be something like this:
ff 01 00 04 20 00 25 (This will make the camera to pan left at moderate speed)
"synch byte" - ff
"address byte" - 01
command 1 byte - 00 (no action)
command 2 byte - 04 (pan camera to the left)
data 1 byte - 20 (pan at moderate speed)
data 2 byte - 00 (no additional data)
checksum - 25 (add contents of bytes 2 through 6)
Can anyone provide me information on how to use 8051 to decode the serial data.
The data transmitted from the keyboard will be something like this:
ff 01 00 04 20 00 25 (This will make the camera to pan left at moderate speed)
"synch byte" - ff
"address byte" - 01
command 1 byte - 00 (no action)
command 2 byte - 04 (pan camera to the left)
data 1 byte - 20 (pan at moderate speed)
data 2 byte - 00 (no additional data)
checksum - 25 (add contents of bytes 2 through 6)
Can anyone provide me information on how to use 8051 to decode the serial data.