![Tern CAN-Engine Technical Manual Download Page 16](http://html.mh-extra.com/html/tern/can-engine/can-engine_technical-manual_1089501016.webp)
Chapter 3: Hardware
CAN-Engine
3-6
Signal
Pin
Function
P23
RxD0
Default SER0 debug
/INT4
J2 pin 33
Ethernet interrupt, if U8 is installed
Table 3.2 I/O lines used for on-board components
3.4
I/O Mapped Devices
3.4.1
I/O Space
External I/O devices can use I/O mapping for access. You can access such I/O devices with inportb(port) or
outportb(port,dat). These functions will transfer one byte or word of data to the specified I/O address. The
external I/O space is 64K, ranging from 0x0000 to 0xffff.
The default I/O access time is 15 wait states. You may use the function void io_wait(char wait) to define the
I/O wait states from 0 to 15. The system clock is 25 ns ( or 50 ns), giving a clock speed of 40 MHz (or 20
MHz). Details regarding this can be found in the Software chapter, and in the Am186ES User’s Manual.
Slower components, such as most LCD interfaces, might find the maximum programmable wait state of 15
cycles still insufficient. Due to the high bus speed of the system, some components need to be attached to
I/O pins directly.
For details regarding the chip select unit, please see Chapter 5 of the Am186ES User’s Manual.
The table below shows more information about I/O mapping.
I/O space
Select
Location
Usage
0x0000-0x00ff
/PCS0
J1 pin 19=P16
USER*
0x0100-0x0103
/PCS1
J2 pin 13=P17
U4 pin 4-5
0x0200-0x02ff
/PCS2
J2 pin 22=CTS1
USER
0x0300-0x03ff
/PCS3
J2 pin 31=RTS1
USER
0x0400-0x04ff
/PCS4
Reserved
0x0500-0x05ff
/PCS5
J2 pin 15=P3
USER
0x0600-0x06ff
/PCS6
J2 pin 24=P2
USER
*PCS0 may be used for other TERN peripheral boards.
To illustrate how to interface the CAN-Engine with external I/O boards, a simple decoding circuit for
interfacing to an 82C55 parallel I/O chip is shown in Figure 3.1.
/WR
/RD
/SEL20
A0
A1
D0-D7
/CS
/WR
/RD
82C55
RST
P00-P07
P10-P17
P20-P27
1
/PCS0
A7
6
VCC
4
3
2
5
A5
A6
/SEL20
/SELF0
/SELC0
/SELA0
/SEL80
/SEL60
/SEL40
14
13
12
11
10
9
7
NC
15
74HC138
C
A
B
G2A
G2B
G1
Y2
Y3
Y4
Y5
Y6
Y7
Y1
Y0
Figure 3.1 Interface to external I/O devices