Re: RS232-TD comm on 390
Bill Troyer <[email protected]>
| Newsgroups | gmane.comp.hardware.microcontrollers.tini |
|---|---|
| Message-ID | <[email protected]> |
Hi -
At 03:42 PM 3/5/2004 +0100, Pär Hansson wrote:
>Hello,
>Trying to get a 390 (running 1.12) to talk to a servo controller (http://www.seetron.com/ssc.htm).
>I've been using both STEP+ and older Vinculum protoadapter boards.
>The controller only uses DB9 pin 3 (TD) and 5 (GND) to talk RS232, and claims to
>work with any hardware that handles RS232.
>I've run the corresponding J2SE code from my laptop with the controller connected
>without any problems.
>On the tini, I've run "stopserver -s" through telnet and then started my program with the
>controller connected, which appears to run fine, but nothing seems to be happening on
>serial0. I've tried connecting the TINI to my laptop to run a hyperterminal session, but
>that seems to lock up the TINI somehow. Can anyone offer any help?
The TINI locks up because hyper terminal uses the DTR - which re-boots the TINI
The STEP+ is wired as DCE not DTE so you would need to swap the pins 3 & 5.
You should be able to use the com1 port of the STEP+ it is also DCE so you still need to swap pins 3 & 5
from STEP docs (http://www.systronix.com/tini/step_rev1_quick_ref.pdf)
1Wire Net or Auxiliary RS232: JP4 controls the function of the auxiliary
serial port on STEP. It can be RS232 level serial I/O on the lower DB9
connector (wired as DCE) or Dallas 1Wire network on P7 (the RJ12 connector
between the serial DB9 connectors). JP4 has two positions:
JP4 position 1-2 (top): signal PCE3(L) (P5.7 configured as an I/O pin)
determines whether serial port 1. When P5.7 is high, communication is through
the external 1-wire bus.
JP4 position 2-3 (bottom): serial port 1 is auxiliary RS-232 output. The
external one wire bus is not active. P5.7 has no control over 1Wire vs RS232
with the jumper in this position.
Bill
>/ Pär
>
>The (both the tini and J2SE) program simply does the standard:
>
> sp = (SerialPort) CommPortIdentifier.getPortIdentifier("serial0").open(serialName, 5000);
> sp.setSerialPortParams(9600, SerialPort.DATABITS_8,
> SerialPort.STOPBITS_1,
> SerialPort.PARITY_NONE);
> sp.setFlowControlMode(SerialPort.FLOWCONTROL_NONE);
> serialOut = sp.getOutputStream();
>
>and then to work the servos I send three bytes per session:
> // send the attention signal
> serialOut.write((byte)255);
> serialOut.flush();
> // select the servo to control
> serialOut.write((byte)servo);
> serialOut.flush();
> // write the position
> serialOut.write((byte)position);
> serialOut.flush();
>
>_______________________________________________
>TINI mailing list
>TINI-6tN4nzCoH/[email protected]
>To UNSUBSCRIBE, edit your profile, or see list archives:
>http://lists.dalsemi.com/mailman/listinfo/tini
_______________________________________________
TINI mailing list
TINI-6tN4nzCoH/[email protected]
To UNSUBSCRIBE, edit your profile, or see list archives:
http://lists.dalsemi.com/mailman/listinfo/tini