|
|
| Author |
Message |
dkinzer Site Admin
Joined: 03 Sep 2005
Posts: 2593
Location: Portland, OR
|
|
Posted: 10 January 2006, 23:41 PM Post subject: |
|
|
The firmware doesn't support this. When DefineCom() is called, the pin specified for reception is made an input and then the pin specified for reception is made an output in the idle state.
The only way to support half duplex, single queue operation would be to add a way to enable/disable the transmit and receive sections, essentially a "switch directions" command. |
|
| Back to top |
|
 |
dkinzer Site Admin
Joined: 03 Sep 2005
Posts: 2593
Location: Portland, OR
|
|
Posted: 11 January 2006, 0:57 AM Post subject: |
|
|
If you'd like to experiment with selectively enabling the transmit and receive sections of the software UART channels, you can try the following code. This is for experimental purposes only - it is not intended as a long-term solution.
N.B.: the code is specific to a certain firmware version as indicated.
| Code: | ' This experimental subroutine can be used to selectively enable and disable
' the transmit and receive sections of one of the software UART channels 3-6.
' The 'flags' parameter contains bits as follows:
'
' &H01 - enable the receive channel
' &H02 - enable the transmit channel
'
' This is coded specifically for firmware version v1.1.2. It may not work
' with other firmware versions. To confirm that the address of the internal
' data structure is correct, check the bytes at offset 7 and 8 from the
' value of 'uartData' defined below. Those bytes should contain the low byte
' of the memory-mapped I/O port for the transmit pin and the port bit mask
' for the transmit pin, respectively for Com3. Likewise, offsets 14 and 15 should
' contain the same values for the receive pin for Com3.
' The data will be valid only after DefineCom() has been called for Com3.
'
Sub enableCom(ByVal chan as Byte, ByVal flags as Byte)
Const uartData as UnsignedInteger = &H4a9
Dim mem(1) as Byte
Call SetBits(mem(uartData + 5 + CUInt((chan - 3) * 21) - mem.DataAddress), &H03, flags)
End Sub |
|
|
| Back to top |
|
 |
DH* Guest
|
|
Posted: 11 January 2006, 11:53 AM Post subject: |
|
|
I'll try to play with it once I receive my ZX-24.
The existing boards for this app were designed to use two pins so this is not critical. I expect I'll have adequate RAM so an extra queue isn't really a problem. I'm just trying to learn where the limits and gotchas might be. |
|
| Back to top |
|
 |
|