Converting Program Codes; Other Limitations; Programming The Watchdog Timer - Advantech ADAM-4500 User Manual

Pc-based communication controller
Table of Contents

Advertisement

Converting Program Codes

The ADAM-4500 has an 80188 CPU. Therefore, programs downloaded into its flash ROM must first be
converted into 80186 or 80188 compatible code, and the floating point operation must be set to emulation
mode. For example, if you were to develop your application program in Borland C, you would compile the
program as indicated in the screen below.
Figure 3-1: Converting Program Codes

Other Limitations

1. The ADAM-4500 does not support the standard PC function "8253". Therefore, the C language
function call "delay ( )" cannot be used in ADAM-4500 applications.
2. Certain critical files are always kept in flash ROM, such as the operating system files, BIOS, and
monitoring files. Aside from the storage space needed for these critical files, the ADAM-4500 has an
additional 170 KB of free ROM space for downloading user applications. An additional free 234 KB of
SRAM is provided for operation of applications.

Programming the Watchdog Timer

The ADAM-4500 is equipped with a watchdog timer function that resets the CPU or generates an
interrupt if processing comes to a standstill for any reason. This feature increases system reliability in
industrial standalone and unmanned environments.
If you decide to use the watchdog timer, you must write a function call to enable it. When the watchdog
timer is enabled, it must be cleared by the application program at intervals of less than 1.6 seconds. If it
is not cleared at the required time intervals, it will activate and reset the CPU, or generate an NMI (Non-
maskable interrupt). You can use a function call in your application program to clear the watchdog timer.
At the end of your program, you need an additional function call to disable the watchdog timer.
The following program shows how you might program the watchdog timer in C programs:

Advertisement

Table of Contents
loading

Table of Contents