On Sat, 19 May 2018 18:05:22 +0000 (UTC), Martin Gregorie wrote:
> Thanks for that. With Rx and TX shorted together at the stereo jack the
> AXE027 adapter cable is successfully echoing test strings back through
> ptlrc - so the cable is working.
>
>> Important is to get the BAUDRATE correct.
>>
>> On your code it loopback works OK at both 4800 and 9600 baud.
It ought to as the port is listening at the same rate as it's sending
at and at the correct levels and polarity.
The AXE027 is a TTL device (GIYF). Previously you've said the KRT2 is
designed to work with a PC RS232 serial port so the odds are it is
expecting +/- 12 V RS232.
IIRC the RS232 spec does have the signals inverted on the wire but as
it's the spec it's not relevant to two RS232 devices talking to each
other. How ever if the PICAXE adapter is TTL it probably isn't
inverted and the levels are wrong (though some RS232 ports aren't
that fussy about levels).
The quickest and simplest solution is if you have a known USB > RS232
adapter try that. If it has a D type connector it probably is RS232,
check by measuring the voltage on the Txd pin with it powered up 12 V
(+ or -) means RS232. Otherwise you need to invert the Tx and Rx
lines from the AXE027 at TTL levels and hope the KRT2 doesn't demand
+/- 12 V and what ever you use to do the Rx inversion can tolerate
being driven to -12. Two transistors and a handful of R's? Power for
this inversion circuitry is an issue as you can't "borrow" from the
hardware handshake lines... Get a proper USB > RS232 adapter. B-)
--
Cheers
Dave.
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|