Problem Connecting FT232R USB to ZX Devices

Discussion about the ZBasic language including the System Library. If you're not sure where to post your message, do it here. However, do not make test posts here; that's the purpose of the Sandbox.
Post Reply
mikep
Posts: 796
Joined: 24 September 2005, 15:54 PM

Problem Connecting FT232R USB to ZX Devices

Post by mikep »

I have several FT232R USB to TTL serial devices. I have noticed the following behavior.

The ZX device has a simple hello world LED flashing program that alternatively turns on the Red and Green LEDs. I tried several different kinds.

I plug in the USB device and the PC assigns a serial COM port. The device drivers were previously installed. No host serial port monitor is running.

The hello world program appears to stutter meaning that the red LED starts to flash several times. After about 2 or 3 seconds, it seems that the ZVM has figured out that there is no connection and the LEDs start alternately flash the red and green LEDs.

This problem does not occur when connected to a regular RS232 serial port.
Mike Perks
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Re: Problem Connecting FT232R USB to ZX Devices

Post by dkinzer »

mikep wrote:The hello world program appears to stutter meaning that the red LED starts to flash several times.
I suspect that the device driver is toggling the DTR line, causing resets. This hypothesis could be tested by removing the DTR connection to the ZX and repeating the experiment.
- Don Kinzer
mikep
Posts: 796
Joined: 24 September 2005, 15:54 PM

Re: Problem Connecting FT232R USB to ZX Devices

Post by mikep »

dkinzer wrote:I suspect that the device driver is toggling the DTR line, causing resets. This hypothesis could be tested by removing the DTR connection to the ZX and repeating the experiment.
Indeed I just tried that and the "problem" no longer occurs.

This is probably worth documenting in the ZBasic reference manual and the manuals for the various FT232RL based boards (USB-TTL, ZX1280 Dev Board and ZX1281 dev Board). There are two workarounds:
  • Disconnect the DTR line unless needed for downloads (already documented)
  • Use ATNCHAR - I couldn't find the documentation for this anywhere in the manuals. ZX_NO_DTR doesn't seem to be mentioned either.
Mike Perks
Post Reply