Having troubles establishing connection on COM2

Discussion specific to the 24-pin ZX microcontrollers, e.g. ZX-24r, ZX-24s and ZX-24t.
Post Reply
wwwoholic
Posts: 53
Joined: 23 December 2010, 20:58 PM

Having troubles establishing connection on COM2

Post by wwwoholic »

I am trying to connect ZX24n to Roboteq MDC2250 motor controller. It has fixed baud set at 115200. I was able to make it work reliably when connected to COM1. No extra hardware except DB9 connector.

For COM2 I used DS275 chip, which is kinda overkill since RoboteQ inputs are TTL compatible, so it is only the inverting feature that is really used. Testing the communication with Hyperterm on laptop failed, however when I reduced speed to 9600 it started working right away. When I connected Tx line of laptop with corresponding pin on DS275 the connection became stable on 115200. My guess it is because RS232 on laptop conforms to the specification and requires true negative voltage swing at higher baud rates. I suspect RoboteQ does not follow specification, or probably uses the same trick for stealing negative voltage as DS275 does, so they can't work together.

Question: could adding pull-up before DS275 help with stability at higher baud rates?

As COM1 works without problems I guess if I replicate same schematics for COM2 it should also work. The schematics for ZX24n uses T7WH04 as inverter. I was not able to locate this chip anywhere on the web.

Question: You recommend 74LS04 or 74HC04. Which do you think would be better for this task? Or, to put it differently, which is closer to the one you using on ZX itself? Also, you always connect two of the invertors in parallel for Tx line. Is this simply to increase max load current or there are other reasons? Can I use a single gate?

And a last question (sorry for long list): do you think using MAX232 would have solved all this problems?
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Re: Having troubles establishing connection on COM2

Post by dkinzer »

wwwoholic wrote:You recommend 74LS04 or 74HC04. Which do you think would be better for this task?
The 74HC04 is probably closer to the T7WH04 specifications; an alternate that we use is 74LVC3G04. We used two gates in parallel just to increase the drive capability. Depending on the load imposed by the DS275, you may be able to get by with a single gate.
wwwoholic wrote:do you think using MAX232 would have solved all this problems?
I would guess so since its output conforms to the RS-232 standard.
- Don Kinzer
wwwoholic
Posts: 53
Joined: 23 December 2010, 20:58 PM

Post by wwwoholic »

Apologies for resurrecting this old thread. Another project with this motor controller and I am struggling with it again.

Configuration: ZX-24s controller, HW serial output connected to Roboteq via 74HC04 inverter.

Problem: Everything works flawlessly if program started from IDE with laptop connected to ZX via USB-to-RS232 adapter. However if laptop is disconnected and program started by simple power switch then 9 out of 10 times Roboteq either sends random output or freezes altogether, as if it does not understand incoming commands.

I have no explanation for this weird behavior, not even theory. Even if short (10") cable between ZX and Roboteq catches some interference then adding more wires (laptop connection) to the system can only increase the noise, not block it.
Post Reply