[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ser3 as GP I/0

Hi there!
There is really only one TX output and one RX input available
on X9.
But you could actually only use the ser3 signalsa like this:
TX signal as output
RX signal as input
CTS signal as input if you patch it through D18 that is not mounted.
RTS signal as output can't be used unless you you patch it somehow
so it don't control the direction of D24.
Check the schematics!

See send_break() function in elinux/drivers/char/etrax100ser.c
on how to fiddle with the TR_CTRL register to control the TX pin.
See E100_CTS_GET() for the RX pin, but the mask is 0x10 fro the RXD pin.
You probably want to add support for controlling/reading TX and RX
in rs_ioctl()/set_modem_info()
The TIOCM_ST and TIOCM_SR flags should perhaps be used for this
but I'm not sure.

Perhaps you could use ser1 on X25 instead?
(still need the software changes though)
Or, if you don't really use the DSR, RTS, CTS, DTR and RI signals on
ser0 or ser2 you could use them.
NOTE: Only outputs can be directly used as 3.3 V signals on
X18 and X4. (Inputs will compete with the RS-232 drivers unless
you remove them)
RI and CD on COM2 can be used as bidirectional I/O.

Then it's straightforward to access them through software using
ioctl()'s, see apps/hwtestserial/

Hope this helps!


----- Original Message -----
From: Alexander Gordon (QIC) <Alexander.Gordon@xxxxxxx.se>
To: <dev-etrax@xxxxxxx.com>
Sent: Tuesday, March 27, 2001 8:06 PM
Subject: ser3 as GP I/0

> Hello!
> I need 4 General purpose I/0's, and it seems suitable to use port ser3
with screw-terminals on the developer-board.
> Is it possible to do that?
> I have a small crisis here and must have theese GP I/0's working today!!
> Please help me out!
> Some sample code would be appreciated.
> Best regards Alexander Gordon