Re: use com port as parallel port
From: Ann (Anna_at_nospam.invalid)
Date: 11/20/04
- Next message: Sudsy: "Re: Deployed EJBs' count-programatically"
- Previous message: Ann: "Re: Writing to Word documents"
- In reply to: steve: "Re: use com port as parallel port"
- Next in thread: Babu Kalakrishnan: "Re: use com port as parallel port"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 20 Nov 2004 05:47:11 GMT
"steve" <me@me.com> wrote in message
news:0001HW.BDC4BFFA000F75D5F080F5B0@news.newsguy.com...
> On Sat, 20 Nov 2004 01:48:05 +0800, Graeme Hill wrote
> (in article
> <Pine.LNX.4.33.0411191741420.13307-100000@server.albanypark.com>):
>
> > Please remember that according to the RS232 specification, a 1 (high
bit)
> > is a NEGATIVE voltage with respect to ground - between perhaps -5
and -15
> > volts. A 0 (low bit) is POSITIVE with respect to ground, again e.g. +5
to
> > +15 volts.
> >
> > Paralell ports, on the other end, will typically operate at TTL voltages
> > e.g. 0 V is 0(low) bit, +5V is 1(high) bit.
> >
> > If you don't know what you doing, you will almost certainly fry your
RS232
> > port.
> >
> >
> > More info e.g. http://www.sangoma.com/signal.htm
> >
> > On Fri, 19 Nov 2004, Babu Kalakrishnan wrote:
> >
> >> b3ny wrote:
> >>>> So while you cannot control the state of the TxD pin (or read that of
> >>>> the RxD pin) programmatically, all the remaining pins (DTR and RTS as
> >>>> outputs and DSR,CTS,DCD and RI as inputs) can be controlled / read
> >>>> asynchronously from the PC.
> >>>
> >>>
> >>> tell me how it works???
> >>> how di i have to config the comm api?
> >>> maybe a little source code example?
> >>>
> >>
> >> Check out the API for the javax.comm.SerialPort class. You have the
> >> setDTR(), setRTS() methods to set the output bits and the
> >> isDSR(),isCTS(), isCD(), isRI() methods for reading the bits.
> >>
> >> BK
> >>
> >
>
> there is not enough wires, to cover all his options , unless he implements
> some external logic.
>
> he has a number of options.
>
> 1. give up
> 2. use the parallel port.
> 3. use the usb port with a couple of extra chips.
> 4. if he insists on using the serial port, he just needs a parallel to
serial
> convertor chip.
> then feed his signals into the parallel side.
> he can use the chip to handle the RS232 interface
>
> Then use 2 other control lines 1 to reset the chip & 1 to act as a clock.
(
> unless the chip implements it own internal clock)
>
> first step , each time he wants to read.
> 1. issue a reset signal to the external chip ( puts the parallel chip in
> exactly a known state)
> 2. issue a clock signal to clock the data out, until 1 byte received.
> allow the api to assemble the byte.
> 3. read byte , decode bits.
> go to 1.
>
> he does not even need a voltage convertor. to get his +- supply. if he
is
> smart he can leach off the RS232 port. ( set 1 line high , & 1 line low
then
> use that to power the chip & circuit ( cmos))
>
You can also get a USB to Centronix 36pin printer cable
that will convert USB to parallel. I saw one at a store for $20.
I bought a serial to parallel converter a few years back, maybe $35
but prices have probably dropped.
- Next message: Sudsy: "Re: Deployed EJBs' count-programatically"
- Previous message: Ann: "Re: Writing to Word documents"
- In reply to: steve: "Re: use com port as parallel port"
- Next in thread: Babu Kalakrishnan: "Re: use com port as parallel port"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|