Intel 386 Computer Hardware User Manual


 
Intel386™ EX EMBEDDED MICROPROCESSOR USER’S MANUAL
16-12
#define CS2 0x4
#define CS3 0x8
#define CS4 0X10
#define RXD0 0x20
#define TXD0 0X40
#define CTS0 0X80
// Port 3 configuration defines
#define TMROUT0 0x1
#define TMROUT1 0x2
#define INT0 0x4
#define INT1 0x8
#define INT2 0x10
#define INT3 0x20
#define PWRDWN 0x40
#define COMCLK 0x80
// Port Direction defines
#define P0_IN 0x1
#define P1_IN 0x2
#define P2_IN 0x4
#define P3_IN 0x8
#define P4_IN 0x10
#define P5_IN 0x20
#define P6_IN 0x40
#define P7_IN 0x80
#define Px_OUT 0
//Initialize SIO0 pins, DRAM and SRAM Chip Selects, Interrupt Signals,
//and TimerOut Signals to be in peripheral mode
Init_IOPorts( DCD0|RTS0|DTR0|DSR0|RI0,
CS2|CS4|RXD0|TXD0|CTS0,
TMROUT0|TMROUT1|INT0|INT1|INT2|INT3|PWRDWN|COMCLK,
Px_OUT,
Px_OUT,
Px_OUT,
0xff, // This example shows all output pins being
// initially 1
0xff, // Note: Input pins must be given an initial
0xff ); // value of 1 whereas peripheral pins initially
// can be set or cleared
Real/Protected Mode:
No changes required.
********************************************************************************
/
extern void Init_IOPorts(BYTE Port1, BYTE Port2, BYTE Port3, BYTE PortDir1,
BYTE PortDir2, BYTE PortDir3, BYTE PortLtc1,
BYTE PortLtc2, BYTE PortLtc3)