EasyManua.ls Logo

Intel 386

Intel 386
691 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
13-33
SYNCHRONOUS SERIAL I/O UNIT
_SetEXRegWord(SSIOTBUF, value);
value++;
}
else {
/* Disable Transmitter and Transmitter interrupts */
for(i=0;i < 4000; i++) { // Delay so transmit begins before disable
_asm {
nop
}
}
_SetEXRegByte(SSIOCON1,_GetEXRegByte(SSIOCON1) & 0xcf); // Clear TEN, TIE
}
} /* Service_THBE */
/*****************************************************************************
Example Code showing SSIO transfer in which the transmitter is
interrupt-driven and the receiver is polled:
InitSSIO(SSIO_RX_ENAB | SSIO_TX_ENAB | SSIO_TX_IE,
SSIO_TX_MASTR | SSIO_RX_SLAVE, 0xF0, 0);
// Setup SSIO interrupts
_SetEXRegByte(INTCFG, _GetEXRegByte(INTCFG) & 0xfd); // Slave IR1 is
// multiplexed
SetIRQVector(SSIO_ISR, 9, INTERRUPT_ISR); // SSIO IR will be generated
// on Slave IR1
Disable8259Interrupt(IR1+IR3+IR4+IR5+IR6+IR7, IR0+IR2+IR3+IR4+IR5+IR6+IR7);
Enable8259Interrupt(IR2,IR1); // Enable slave interrupt to master(IR2),
// Enable slave IR1
_enable(); // Enable Interrupts
// Initialize SSIO Ports
_SetEXRegByte(PINCFG, _GetEXRegByte(PINCFG) & 0xfc);
_SetEXRegByte(SIOCFG, _GetEXRegByte(SIOCFG) & 0xfb);
// Fill up transmit buffer with first character
_SetEXRegWord(SSIOTBUF, ‘a’);
// Use Polled SSIO receiver function to receive character
while ( input < ‘z’ ) {
input = SSerialReadWord(SSIO_RX_SLAVE);
SerialWriteChar(SIO_0, (BYTE)input); // Print to screen
}
******************************************************************************/

Table of Contents

Related product manuals