Newsgroups: comp.sys.transputer
From: teig@autro1.UUCP (Oyvind Teig)
Subject: Is it feasable to implement a software UART on a T225?
Organization: Autronica A/S, Trondheim, Norway
Date: 8 Aug 94 07:14:37 GMT
Message-ID: <174@autro1.UUCP>

DUART IMPLEMENTED IN OCCAM IN T225 - FEASABLE?

I am looking at implementing a (double) UART in occam in a T225.
The transputer will in addition to being a DUART, handle the serial
line protocol, and do some other minor A/D etc.

I consider an UART software to be fairly easy, the way I'm thinking of
doing it is to (over)sample an input-port at a constant speed, independent
of baud-rate, and note the time of each transsition. Later on, in another 
process, I will extract the bits, knowing the speed, also filter a little. 
The reason for all this is that I must implement auto-baud detect, and 
*use* the first character received - so a hardware UART is impossible(?)
to use.

Some UARTS have separate I/O-pins in addition to the TxD and RxD. It is
then possible to combine the software UART and a hardware UART, but then the
hardware UART isn't necessary.

I'm not planning on using the EVENT-pin. Baud-rate is 600,1200,1800 or 2400.
This means that I'll *have* to sample at 4800, which is every 208 uS. The fact 
that I want to make a DUART should'n make much difference, as we have a 
master-slave protocol, and I suppose that polling will take the most time 
anyhow. I have single duplex, meaning that I don't have to receive and send
at the same time on the same UART channel. But I must poll on channel 0 even
if I send on channel 1 and vice versa.

Q1.
Is this possible? I'm planning on no smart programming, just standard occam.
I need a WHILE loop, ALT with control input and timed input.

Q2.
How far can I strecth it? Sampling every 50 uS?

If anybody feels like answering. I'll be very happy.

0.Teig
Autronica
7005
Trondheim
Norway

