[net.micro.pc] DG/1 Interrupt Solution

chi@wlbr.UUCP (Isaacs) (04/29/85)

>Help! Does anyone know how to use the DG/1's serial ports
>in interrupt mode?  Has anyone seen the tech manual?

I too have suffered with the 82C51 chips on the Data General. They used the
chips to save power consumption (82"C"51 = CMOS).  Our local rep. told me 
to call 1-800-DATA-GEN to get the technical info. on the DG1.  A few days 
later they shipped a copy of "Communications on the DG/One, Revision 1.01". 
In this guide there are helpful hints on how to program the 82C51. There 
are sample routines that show you how to zap the 82C51 for bit length, 
parity, etc.

The guide was very helpful, but after reading the guide several times
I still did not have the necessary knowledge to get the serial port to 
interrupt. My program still did not work.

I called the 800 number again and requested more information on the 
interrupt structure.  They said that they did not have any but they
would be happy to send me a sample program listing.  They promptly sent
the program listing (written in assembly code with a "C" device driver
interface front-end). It looks like it was copied from a book; it says:
"Appendix E,  Communications Interface Programs; E.1 Example Communications
Device Driver" The assembly code name is "c8251c.asm".

The Trick:

It turns out that the trick to getting the thing to intterupt is when you
transmit a character, you must first set transmit enable (TxEN = true).
You then must put the character into the data register. In order to ship
the character you must drop(!) transmit enable (TxEN = false), which
in turn sets the TxRDY pin output = 0. At the same time that TxEN is set
false, you must make sure that RxEN is ALSO set TRUE to keep the RX  
interrupts enabled. Using this scheme I was able to get our communications
software to work.

P.S. Data General was very nice about sending me the documentation.

Disclaimer, etc...