Searching \ for 'RS232 on Parallel port' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/io/serials.htm?key=rs232
Search entire site for: 'RS232 on Parallel port'.

Truncated match.
PICList Thread
'RS232 on Parallel port'
1999\03\08@081442 by Caisson

flavicon
face
> Van: Les <spam_OUTlesTakeThisOuTspamTOP204.FREESERVE.CO.UK>
> Aan: .....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU
> Onderwerp: RS232 on Parallel port
> Datum: zaterdag 6 maart 1999 14:14
>
> Hi

Hello Les,

>             Has anybody written any RS232 code in Qbasic for the Parallel
> port. I have written I2C and SPI without any trouble but RS232 eludes me
I
> even used a machine independant delay routine based on the Hardware of
the
> computer but without much success, sometimes it seems to work but not
quite
> right. Any input would be welcome. And before you go writing it I know I
> have several perfectly good serial ports, but HEY!! some things just have
to
> be done just because they can be.

A _very_ good attitude.  I'm biased ofcourse, because I'm of the same
opinion ;-)

But, to adress your problem :  Both I2C and SPI are clocked protocols.  In
other words : The time between the bits do not matter, the clock tell's you
when a bit is valid.  With RS232 on the other hand groups-of-bits are
placed in a "time-frame".  When the computer decides something important
has to be done (like updating the system-clock) your RS232 program will be
stopped, the service routine for {whatever} will be executed and aftr that
your program regains controll again.  This could throw your timing off ...
Only when using quite low data-rates the (accumulated) delay will not be
large enough to consume 50% of your bit-time (in one Time-frame /
startbit-data-stopbit combination)

Greetz,
 Rudy Wieser

1999\03\08@175842 by John Payson

flavicon
face
|            Has anybody written any RS232 code in Qbasic for the Parallel
|port. I have written I2C and SPI without any trouble but RS232 eludes me I
|even used a machine independant delay routine based on the Hardware of the
|computer but without much success, sometimes it seems to work but not quite
|right. Any input would be welcome. And before you go writing it I know I
|have several perfectly good serial ports, but HEY!! some things just have to
|be done just because they can be.

Under DOS, it would be possible to create a timer-tick handler to do
communications as you describe.  Since QBASIC likes to have the timer
tick to itself, however, I think making such a thing work there would
be impractical.  Doing such comm's without a timer-tick interrupt rou-
tine would be flakey at best and probably not worth doing.

OTOH, if you have a couple of 165's and can make an oscillator that
runs at the right speed, it would not be hard to design a simple trans-
mit only circuit.  Simply arrange the 165's to clock out the data patt-
ern:

 10dddddddd111111

where dddddddd is the data from the printer port.  Hitting and releasing
the "load" wire on the 165's would trigger them to output the specified
byte; it would be the responsibility of the software to ensure that no
effort was made to send out another byte until the first was completed.


Attachment converted: wonderland:WINMAIL.DAT (????/----) (0002BDE2)

1999\03\09@124318 by mlsirton

flavicon
face
Hi,

On  8 Mar 99 at 16:59, John Payson wrote:
> |            Has anybody written any RS232 code in Qbasic for the Parallel
> |port. I have written I2C and SPI without any trouble but RS232 eludes me I
> |even used a machine independant delay routine based on the Hardware of the
> |computer but without much success, sometimes it seems to work but not quite
> |right. Any input would be welcome. And before you go writing it I know I
> |have several perfectly good serial ports, but HEY!! some things just have to
> |be done just because they can be.

I've written code for half-duplex RS232 comm. through the parallel
port (fixed speed, 9600bps) in C, it ran fine on 8088 XT's so the
horsepower is in there.  As far as I remember I've used the tone
generator timer to avoid messing with the time keeping.  This was for
transmitting.  I used a calibrated software delay for receiving.
The application was mainly transmitting and just receiving a few
chars at a known time.

You need to disable the timer interrupt while receiving/transmitting
or it might kick in and upset your timing in the middle of the byte.
I'm not sure Qbasic is the right tool for the job...  What speeds are
you aiming at?

Let me know if you want me to look up my old C code for you... My
old Sincalir ZX-Spectrum used to have software RS232 communications
(half-duplex but variable speed), Z80 assembly.

Hope this helps,
Guy

1999\03\09@131010 by mlsirton

flavicon
face
On  9 Mar 99 at 19:37, Guy Sirton wrote:
> On  8 Mar 99 at 16:59, John Payson wrote:
> > |            Has anybody written any RS232 code in Qbasic for the Parallel

The above was actually written by Les and not by John... (Finger
quicker than brain kind of thing...)

Guy

More... (looser matching)
- Last day of these posts
- In 1999 , 2000 only
- Today
- New search...