I have an issue with the following code for the ZX1280n (I am using your development board). On ZBasic Ver 3.3.3 this prints ok to the serial port, on Ver 4.3.10 it prints nothing after the ZBasic identifier. Would you kindly take a look and see what it happening? A similar thing on Ver 3.3.3 required Call CloseCom(1,0,0) to output to the serial port, but this does not seem to be the problem with the Ver 4.3.10. My application uses COM1,2,7, and 8 so if you can check those as well to see if a similar issue may exist.
Thanks, Don G
Code: Select all
Option TargetDevice ZX1280n
'Test Pgm for hang after ZBasic version identifier (no print from serial port)
Const COM1InputBufferSize As Integer=80
Const COM1OutputBufferSize As Integer=80
Dim COM1InputBuffer(1 To COM1InputBufferSize) As Byte
Dim COM1OutputBuffer(1 To COM1OutputBufferSize) As Byte
'-----------------------------Main------------------------------------------
Sub Main()
'Open COM1 Serial Port for Zbasic communication and profibus address setting
'add CloseCom line to allow working with ZBasic Ver 3.3.3
Call CloseCom(1,0,0)
Call OpenQueue(COM1InputBuffer, COM1InputBufferSize)
Call OpenQueue(COM1OutputBuffer, COM1OutputBufferSize)
Call DefineCom(1,0,0,&H00,1)
Call OpenCom(1,19200, COM1InputBuffer, COM1OutputBuffer)
Call PutQueueStr(COM1OutputBuffer,"Starting..." + Chr(13) + Chr(10))
Do
Delay(1.00)
Call PutQueueStr(COM1OutputBuffer,"Hello" + Chr(13) + Chr(10))
Loop