Intel 386 User Manual page 432

Embedded microprocessor
Table of Contents

Advertisement

_SetEXRegWord(SSIOTBUF, value);
value++;
}
else {
/* Disable Transmitter and Transmitter interrupts */
for(i=0;i < 4000; i++) {
_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
SetIRQVector(SSIO_ISR, 9, INTERRUPT_ISR); // SSIO IR will be generated
Disable8259Interrupt(IR1+IR3+IR4+IR5+IR6+IR7, IR0+IR2+IR3+IR4+IR5+IR6+IR7);
Enable8259Interrupt(IR2,IR1); // Enable slave interrupt to master(IR2),
_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
}
******************************************************************************/
// Delay so transmit begins before disable
// on Slave IR1
// Enable slave IR1
SYNCHRONOUS SERIAL I/O UNIT
// multiplexed
13-33

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Intel386 exIntel386 extbIntel386 extc

Table of Contents