Chapter 4: Software
R-Engine-D
4-2
8-bit or 16-bit value over the data bus. If there is no component mapped to that address, this function will
return random garbage values every time you try to peek into that address.
outport/outportb
Arguments:
unsigned int address, unsigned int/unsigned char data
Return value: none
This function is used to place the
data
into the appropriate
address
in I/O space. It is used most often
when working with processor registers that are mapped into I/O space and must be accessed using either
one of these functions. This is also the function used in most cases when dealing with user-configured
peripheral components.
When dealing with processor registers, be sure to use the correct function. Use
outport
if you are dealing
with a 16-bit register.
inport/inportb
Arguments:
unsigned int address
Return value:
unsigned int/unsigned char data
This function can be used to retrieve data from components in I/O space. You will find that most hardware
options added to TERN controllers are mapped into I/O space, since memory space is valuable and is
reserved for uses related to the code and data. Using I/O mappings, the address is output over the address
bus, and the returned 16 or 8-bit value is the return value.
For a further discussion of I/O and memory mappings, please refer to the Hardware chapter of this
technical manual.
4.1
Programming Overview
The ACTF loader in the RD 512KB Flash will perform the system initialization and prepare for new
application code download or immediately run the pre-loaded code. A remote debugger kernel can be
loaded into the Flash located starting 0xfa000. Debugging at baud rate of 115,200 (re40_115.HEX for the
Am186ER and re80_115.HEX for the R1100) are available. A loader file “l_debug.hex” and both
debugger files re40_115.hex and re80_115.HEX, are included in the EV-P/DV-P disk under the
c:\tern\186\rom\re\
directory.
A functional diagram of the ACTF (embedded in the RD) is shown below:
Power on or Reset
STEP2 Jumper on ?
J2 pin 38=P4=GND ?
Yes
Read EE for the jump address CS:IP
RUN the program starting at the CS:IP
No
SEND out MENU over SER0 at 19200, N, 8, 1 to
Hyperterminal of Windows95/98
See ACTF-kit and Functions for detail
Text command or download new codes
Process Commands