Discussion forum for the BasicX family of microcontroller chips.
|
I read some of the documentation relative to Com ports. I gather from this that com 2
does not exist - if you want to do serial I/O, you use com3? Also, It would seem that although you can use any pins for serial I/O, you can only use one set at a time. Is this correct? If I want to do serial out of several different pins, must I reassign com3 and re-open it each time before I send? I didn't see any ComClose function, so I assume either it's not necessary, or you can't change once you open com3? Chuck Davis |
|
|
|
There is a hardware COM1 port which can go to 460,800 baud and is fixed in its pin usage. It is the same port as is used to download software. Then there is a COM3 port which can go on any pin you choose for input and output. There is a DefineCOM3 function which chooses the pins and other parameters such as parity and number of bits. Then there is an opencom function which makes the interrupts work and attaches a queue to the COM port. There is no close function, so if you want to change pins once the COM3 has been opened you can just call DefineCOM3 to change its pins. Since there is only one COM3, then you can only accept or send data through these pins at one time - but you can change it as often as you like. If you are sending data, just make sure you have given enough time for the queue to clear before you move to another set of pins. Jack -----Original Message----- From: [SMTP:] Sent: Monday, October 25, 1999 12:30 PM To: Subject: [basicx-ListServer] BX-24 com ports From: I read some of the documentation relative to Com ports. I gather from this that com 2 does not exist - if you want to do serial I/O, you use com3? Also, It would seem that although you can use any pins for serial I/O, you can only use one set at a time. Is this correct? If I want to do serial out of several different pins, must I reassign com3 and re-open it each time before I send? I didn't see any ComClose function, so I assume either it's not necessary, or you can't change once you open com3? Chuck Davis |