I have written a basic program in vb6 that sends serial data to a 2way radio. This software works fine, I then tried to do the same in pic basic but the serial comms does not appear to be working.The first line of code is the vb6 code that sends a connect command to the radio.
MSComm1.Output = Chr$(8) + Chr$(0) + Chr$(181) + Chr$(0) + Chr$(0) + Chr$(0) + Chr$(1) + Chr$(6) + Chr$(196)
Pic basic equivelent
SerOut PORTA.0,n9600,[8,0,181,0,0,0,1,6,196]' logon as DTE
the second line tellls the radio to transmit
MSComm1.Output = Chr$(4) + Chr$(0) + Chr$(187) + Chr$(128) + Chr$(63)
and the pic basic equivelent
SerOut PORTA.0,n9600,[4,0,187,128,63]' transmitt
is ther something wrong in my conversion here or maybe I have a problem elsewhere. I can see data comming out of the port when I look on a CRO.
Bookmarks