Discussion of issues related specifically to writing code for native mode devices. This includes ZBasic code as well as assembly language code and C code, both inline and standalone.
A customer needed a way to perform serial I/O to multiple devices at fairly high speed; higher than the 19.2K supported by the ZBasic software UARTs (Com3-Com6). They suggested that something similar to the SERIN and SEROUT commands of PBasic would meet their requirements quite nicely. In response, I put together some code (for native mode only) that performs direct (non-buffered) serial I/O that has been tested as high as 115.2K baud. It should be able to go even higher, perhaps as high as 460.8K baud.
You can find the code attached. Some discussion of the advantages/disadvantages and a simple test driver can be found in the source code.
Any chance of a version that could be used for downloading?
I have a handful of applications where the ZX-328n would be ideal but the need to invert the hardware UART adds cost and takes up too much PCB real estate.
dlh wrote:Any chance of a version that could be used for downloading?
Unlikely. The downloading code is in the "bootloader" portion of the device that is programmed during manufacturing. Although it might be possible, conceptually, to include bit-banged serial in the bootloader, there isn't enough space left in the bootloader section of Flash to include it.