ZX-1281 development board

Discussion specific to the ZX-1281 and ZX-1280 microcontrollers as well as the ZX-1281 and ZX-1280 Dev Boards.
Post Reply
mtreat
Posts: 10
Joined: 27 November 2005, 16:17 PM

ZX-1281 development board

Post by mtreat »

Is COM2 physically connected to the 1281 or just to the MAX232 chip as shown in the schematic?
Martin
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Post by dkinzer »

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.
- Don Kinzer
ktomecek
Posts: 4
Joined: 21 May 2007, 8:33 AM

Post by ktomecek »

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
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Post by dkinzer »

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: Select all

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.
- Don Kinzer
Post Reply