|
|
| Author |
Message |
mtreat
Joined: 28 Nov 2005
Posts: 10
|
|
Posted: 13 April 2007, 21:55 PM Post subject: ZX-1281 development board |
|
|
| Is COM2 physically connected to the 1281 or just to the MAX232 chip as shown in the schematic? |
|
| Back to top |
|
 |
dkinzer Site Admin
Joined: 03 Sep 2005
Posts: 2499
Location: Portland, OR
|
|
Posted: 13 April 2007, 23:25 PM Post subject: |
|
|
The RXD0 and TXD0 pins of the ZX-1281 (pins E.0 and E.1, respectively) are not connected to anything other than J5. This allows those pins to be used either for general I/O or for Com2.
The second DB-9 connector, J11, has its pins 2 and 3 connected to the RS-232 side of the transceiver. The TTL side of the transceiver is connected to J13 (located near the transceiver chip). If you install SIP sockets in the J13 holes, you can then install jumper wires between those pins and the processors I/O pins that you want to use. |
|
| Back to top |
|
 |
ktomecek
Joined: 21 May 2007
Posts: 4
|
|
Posted: 07 June 2007, 19:17 PM Post subject: |
|
|
Hey Don,
I have been playing around a lot with this board. It is awesome. In continuation of the previous question, I understand thet EO and E1 are COM2. However, I am not sure how to address them in the application. Console.XXX refers to COM1 and there is no other Comm command. Assume I need to use OpenCom(), but it is still not clear to me how to read and write to this port. Any pointers you can share?
Thanks,
Karl Tomecek |
|
| Back to top |
|
 |
dkinzer Site Admin
Joined: 03 Sep 2005
Posts: 2499
Location: Portland, OR
|
|
Posted: 07 June 2007, 19:51 PM Post subject: |
|
|
| ktomecek wrote: | | Assume I need to use OpenCom(), but it is still not clear to me how to read and write to this port. |
The channel number for Com1 is 1 and for Com2 it is 2. You can use Com1 and Com2 in the same manner as you would Com3-Com6 except that, since they are hardware UARTs, a call to DefineCom() is not needed. However, you can use DefineCom() to specify the data width, parity, etc. if needed.
Here is some example code for opening Com2:
| Code: | Dim iq2(1 to 20) as Byte
Dim oq2(1 to 30) as Byte
Call OpenQueue(iq2, Sizeof(iq2))
Call OpenQueue(oq2, Sizeof(oq2))
Call OpenCom(2, 19200, iq2, oq2)
Call PutQueueStr(oq2, "Hello, world!" & Chr(&H0d) & Chr(&H0a)) |
Note that Debug.Print and Console.Write are permanently connected to Com1. Even so, you can use those calls to send output to Com1 even if you've opened Com1 similar to the example above. |
|
| Back to top |
|
 |
|