RS232-TD comm on 390
Pär Hansson <par-02ecni/[email protected]>
| Newsgroups | gmane.comp.hardware.microcontrollers.tini |
|---|---|
| Organization | SICS |
| Message-ID | <[email protected]> |
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?
/ 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