
Talking to external devices via Serial Port (MSCOM.OCX)
I am developing a program in Visual Basic, where I need to exchange
data via a remote device plugged into the PC. I am using the serial
port and MSCOM.OCX control to interface to the PC's serial port. I
have a few questions.
#1 The remote device contains a microcontroller (Microchip PIC) that
has an internal UART. The UART transmits a start bit (LOW) when
sending a data stream, yet it seems that the MSCOM.OCX does not
support a start bit.
How can I work around this?
#2 Why does the MSCOM.OCX have such a limited # of Baud Rate values.
I really need to transmit at 96K, yet my only close choices are 115K
and 56K.
Are there 3rd party serial port controls for VB that have more baud
rate choices?
#3 The microcontroller on the remote device can not be set to transmit
and receive at exactly 56K, since it has its own internal resolution
limits for the baud clock. The actual baud error rate between the PC
and PIC microcontroller is 1%. Is this tollerable in RS-232
communication?
#4 The MSCOM.OCX does not seem to support an effective way of telling
the host application that there was a parity error. The only
capability I can see is that it will insert a character of your choice
into the received data stream if a partity error is received. The
problem is, I can't reserve a character for this purpose, as the
remote device is sending numerical binary data.
I would have to significantly complicate my protocol to accomodate
this.
Is their another way to sense a parity error with the MSCOM.OCX
control?
Thanks