8000 User Manual v1.0.1
8000 User Manual v1.0.1
I-8411/I-8811
I-8431/I-8831
I-8431-80/I-8831-80
Warranty
All products manufactured by ICP DAS are under warranty regarding
defective materials for a period of one year, beginning from the date
of delivery to the original purchaser.
Warning
ICP DAS assumes no liability for any damage resulting from the use of
this product.ICP DAS reserves the right to change this manual at any
time without notice. The information furnished by ICP DAS is believed
to be accurate and reliable. However, no responsibility is assumed by
ICP DAS for its use, not for any infringements of patents or other
rights of third parties resulting from its use.
Copyright
Copyright @ 2012 by ICP DAS Co., Ltd. All rights are reserved.
Trademark
The names used for identification only may be registered trademarks
of their respective companies.
Contact US
Email: [email protected]
The 8000 controller comprises a central processor (CPU), power supply, I/O bus,
communication interfaces, front panel control facilities and connectors to plug in various I/O
modules. The 8000 can operate either as an intelligent front end, connected to a host
machine under control of a SCADA package, or as an autonomous controller running an
embedded application. In this mode it is possible to customize the unit to specific
applications.
The main central processing module (CPM) is based on the powerful AMD 80188/80186
series of microprocessors. The CPM can be considered to be an integrated PC comprising up
to 32Mbytes of Flash storage and up to 512K bytes of battery supported SRAM. The
processor runs it's own version of DOS optimised for real time applications. The extension of
the processor bus into the I/O bus permits high-speed data access from the high
performance parallel I/O modules.
In addition to the standard network interface each CPM is supplied with two serial ports
which can be configured to be either RS232 or 485. These ports can be used to extend the
I/O capability of the unit using or alternatively programmed to drive external serial devices.
The I-8000 are serial/Ethernet controllers designed for data acquisition, remote
measurement, and control applications. Equipped with MiniOS7,an embedded OS, similar to
DOS, can boot
I-8411 4
- 4
I-8811 8
40 MHz
I-8431 4
I-8831 8
1 (10-Base-T) 3
I-8431-80 4
80 MHz
I-8831-80 8
The I-8411/I-8811 are serial embedded controller with 4/8 I/O slots. Both are equipped with
MiniOS7,an embedded OS similar to DOS that is developed by ICPDAS Co., LTD.
The MiniOS7 can boot up in a very short time (0.4 ~ 0.8 second).It has built-in hardware
diagnostic function, and supports the full functions to access all 8K and 87K series I/O
modules, such as DI, DO, DIO, AI, AO, Counter/Frequency, motion modules etc.
The I-8411/I-8811 back plane is equipped four serial COM Port, they include RS-232 and
RS-485 ports and can be used in remote data acquisition and control applications, including
environment monitoring, power management and factory automation. By using S-256 (256
KBytes) or S-512 (512 KBytes)battery backup SRAM, they provide data logger storage
function.
The I-8431/ I-8831 are ethernet embedded controller with 4/8 I/O slots. Both are equipped
with MiniOS7,an embedded OS similar to DOS that is developed by ICPDAS Co., LTD. The
MiniOS7 can boot up in a very short time (0.4~0.8 second).It has built-in hardware diagnostic
function, and supports the full functions to access all 8K and 87K series I/O modules, such as
DI, DO, DIO, AI, AO, Counter/Frequency, motion modules etc.
The I-8431/I-8831are equipped an ethernet port and their back planes are equipped three
serial COM Port, they include RS-232 and RS-485 ports and can be used in remote data
acquisition and control applications, including environment monitoring, power management
and factory automation. By using S-256 (256 KBytes) or S-512 (512 KBytes)battery backup
SRAM, they provide data logger storage function.
The I-8431-80/I-8831-80 are ethernet embedded controller with 4/8 I/O slots. Both are
equipped with MiniOS7,an embedded OS similar to DOS that is developed by ICPDAS Co.,
LTD. The MiniOS7 can boot up in a very short time (0.4~0.8 second).It has built-in hardware
diagnostic function, and supports the full functions to access all 8K and 87K series I/O
modules, such as DI, DO, DIO, AI, AO, Counter/Frequency, motion modules etc.
The I-8431-80/I-8831-80 are equipped an ethernet port and their back planes are equipped
three serial COM Port, they include RS-232 and RS-485 ports and can be used in remote data
acquisition and control applications, including environment monitoring, power management
and factory automation. By using S-256 (256 KBytes) or S-512 (512 KBytes)battery backup
SRAM, they provide data logger storage function.
The i-8411/i-8811 are serial embedded controller that can allow COM port application
to access and control remote I/O in RS-232 or industrial RS-485 network.
The I-8000 is equipped with the MiniOS7, a friendly DOS like OS. Users can use C
compilers that can create 16 bit executable file (*.exe) to develop their own program
then download it to I-8000.
Provides API Functions for:i-8K, i-87K I/O, 7-SEG LED display, RTC (Real Time
The I-8000 supports the MiniOS7 API functions that has hundreds of pre-defined
functions, such as I-8000, i-87K I/O, 7-SEG LED, RTC, EEPROM,… etc, and provides
mostly required for users to program own applications.
Upgrading the firmware, and downloading programs via the RS-232 port
The i-8411/i-8811’s COM1 port can be used to download programs, and update the
MiniOS image file.
The i-8411/i-8811 is equipped with a unique 64-bit hardware serial number. User’s
software can check this number to avoid illegal software copy. Another method to
archive the goal, users can choose the ASICKey method. The ASICKey can be
numbered from 00~ 99. Each number only sold to one customer. User’s software can
check specific ASICKey number to decide whether quit or run forward.
For more information about the 64-bit hardware serial number and AsicKey, please
refer to “Appendix G. How to avoid illegal software copy”.
The i-8411/i-8811 is equipped with 4/8 I/O slots and multi-serial ports. It not only
supports i-8K and i-87K series I/O modules such as DI, DO, DIO, AI, AO and
Counter/Frequency for I/O slots application, but also the I-7K series I/O modules for a
wide range of RS-485 network application.
Each I/O modules allows various numbers of channels. For example, with i-8040 or
i-8041, the i-8810 provides max 256 digital input or digital output channels.
For more information on i-8K and i-87K series modules, please refer to “Appendix B.
i-8K and i-87K series I/O modules”.
The built-in watchdog circuit will reset the CPU module if a failure occurs in either the
hardware or software. If the application program does not refresh the watchdog timer
within 0.8 sec, the watchdog circuit will initiate a reset of the CPU.
The protection circuitry on both the network and power supply protects the system
from external signals such as main spikes and ambient electrical noise. In addition, the
central processing module is isolated from external signals in three ways. This is
achieved through I/O isolation of 3KV, power isolation to 3KV and network isolation to
2KV.
The built-in isolated 20W power supply is rated to perform linearly up to full loading.
The i-8411/i-8811 is housed in a plastic base box with a column-like ventilator that can
help to cool the work environment inside the box and allow the i-8411/i-88111 to
operator between -25 °Cand +75 °C.
The table below summarizes the specifications of I-8000, and lists the accessories that I-8000
supports.
Specification
EEPROM 2 K Bytes
NVRAM Yes
Communicate Interface
COM0 Internal Communication with the 87K modules
COM2 RS-485 -
COM3 RS-232/RS-485
COM4 RS-232
SMMI
LED Display Yes
Programmable LED
Yes
Indicators
Mechanical
230 x 110 x 354 x 110 x 230 x 110 x 354 x 110 x 230 x 110 x 354 x 110 x
Dimensions (W x L x H)
75.5 75.5 75.5 75.5 75.5 75.5
Operating Environment
Operating Temperature -25 ~ +75 C
Power
Protection Power reverse polarity protection
Power Supply 20 W
Accessories
Model
KA-52F AC 100 ~ 250 V input, DC 24V/1A output, flat type power supply
DP-660 24 VDC/2.5 A, 60 W and 5 VDC/0.5 A, 2.5 W Power Supply with DIN-Rail Mounting
DP-1200 24 VDC/2.5 A, 60 W and 5 VDC/0.5 A, 2.5 W Power Supply with DIN-Rail Mounting
I-8000 consists of several different components that integrate with ICP DAS system. Here is
an overview of the components and its descriptions. The following list shows the details of
the components:
I-8411
I-8811
I-8431/I-8431-80
The I-8000 has a screw terminal block with 6 screw-downs. The table below describes the
terminal block designations and its functions.
2. COM1 (RS-232)
4. COM4 (RS-232)
5. DIP Switch
I-8000 are equipped with some extra I/O slots, that can be used to expand capabilities of
I-8000. The number of the expansion I/O slot in each type of I-8000:
SMMI consists of 5-digital LED displays, 4 programmable LEDs, and 4 push buttons,
Each Ethernet port has two LED indicators, which are used to indicate the
network speed and Link/Acting, as described below.
The following information provides the dimensions of I-8000 to use in defining your
enclosure specifications. Remember to leave room for potential expansion if you are using
other components in your system.
The height dimension is the same for all I-8000 family. The width depending on your choose
of I/O expansion slots. All dimensions are in millimeters.
Top View
+VS
Input:
10~30VDC
GND
INIT*
Initialize
INIT*COM
DATA+
RS-485
DATA-
Front View
Top View
+VS
Input:
10~30VDC
GND
I NI T*
I nitialize
I NI T*COM
DATA+
RS-485
DATA-
Front View
This package comes with a CD that provides drivers, software utility, and all of the required
documentations…, etc, and the lastest version of the contents of this CD can be download
from ICP DAS web site.
If you are a new user, begin with this chapter, it includes a guided tour that provides a basic
overview of installing, configuring and using the I-8000.
Before starting any task, please check the package contents. If any of the following package
contents are missing or damaged, contact your dealer, distributor.
Before you work with I-8000, you should have a basic understanding of the hardware
specifications, such as the dimensions, the usable input-voltage range of the power supply,
and the type of communication interfaces.
For more information about the hardware details, see section 1.2., “Specifications.”
For more information about the hardware dimensions, see section 1.4., “Dimension.”
I-8000 can be mounted with the bottom of the chassis in the standard 35 mm DIN rail, or
any other screw-mountable surface. It is necessary that a minimum clearance of 50mm
between the I-8000 and the top and bottom side of the enclosure panels.
2. Tilt the module toward DIN rail until it snaps securely to DIN rail
Grounding
A good common ground reference (earth ground) is essential for proper operation of the
I-8000. One side of all control circuits, power circuits and the ground lead must be properly
connected to earth ground by either installing a ground rod in close proximity to the
enclosure or by connecting to the incoming power system ground. There must be a
single-point ground (i.e. copper bus bar) for all devices in the enclosure that require an earth
ground.
1. Install the four mounting screws into the 4 keyhole mounting holes
The package includes a RS-232 cable for connecting the I-8000 to a PC/Laptop. The I-8000
has the power supply interface for supplying power from the power supply.
i. Connect the +Vs of the I-8000 to the positive of the power supply.
ii. Connect the GND of the I-8000 to the negative of the power supply.
Step 2: Connect to a PC
Connect the COM1 of the I-8000 to a PC using a RS-232 cable that was provided with the
package.
If your I-8000 are Ethernet controller, you also can connect to PC by using an ethernet cable.
Before using the I-7560 converter, you must install the USB driver.
After installing the USB driver, please check the “Device Manager to make sure the driver has
been installed and the COM port number which is assigned to USB interface.
I-8000 has 4/8 I/O expansion slots to expand the functions of I-8000, allowing it to
communicate with external I/O modules, and before choosing the right I/O modules; you
first need to know the I/O expansion capacities in order to choose the best expansion
module for achieving maximal efficiency.
There are more than 30 high profile I/O modules available for interfacing many different
measurements, including thermocouple, voltage, RTD, current, resistance, strain, digital,…,
etc., and these modules have their own manuals, so if you are using them you should
supplement this manual with the manual specifically designed for the special module.
For more information about the I/O expansion modules that are compatible with I-8000, see
http://www.icpdas.com/products/PAC/i-8000/8000_IO_modules.htm#i87
These modules have their own manuals, so if you are using them you should supplement
this manual with the manual specifically designed for the special module.
The I/O user manuals can be found separately on the CD that was provided with the package
or by downloading the latest version from ICP DAS web site.
http://www.icpdas.com/products/PAC/i-8000/8000_IO_modules.htm#i87
All I/O user manuals include the I/O module specifications, pin
assignments, wire connections.
Align circuit card with slot and press firmly to seat module into connector and then Pull top
and bottom locking tabs toward module face. Click indicates lock is engaged
The Companion CD includes complete sets of APIs, demo programs and other tools for
developing your own applications.
The I-8000 header and libraries files can be installed from the CD that was provided with the
package or by downloading the latest version from ICP DAS web site.
MiniOS7 Utility is a suite of tool for managing MiniOS7 devices (I-8000, μPAC-5000,
iPAC-8000, μPAC-7186,. etc.). It’s comprised of four components – System monitor,
communication manager, file manager and OS loader.
The MiniOS7 Utility can be found separately on the CD that was provided with the package
or by downloading the latest version from ICP DAS web site.
CD:\Napdos\minios7\utility\minios7_utility\
ftp://ftp.icpdas.com/pub/cd/8000cd/napdos/minios7/utility/minios7_utility/
MiniOS7 Utility is a suite of tool for managing MiniOS7 devices (I-8000, μPAC-5000,
iPAC-8000, μPAC-7186,. etc.). It’s comprised of four components – System monitor,
communication manager, file manager and OS loader.
The MiniOS7 Utility can be found separately on the CD that was provided with the package
or by downloading the latest version from ICP DAS web site.
CD:\Napdos\minios7\utility\minios7_utility\
ftp://ftp.icpdas.com/pub/cd/8000cd/napdos/minios7/utility/minios7_utility/
The I-8000 has two modes of operation, normal mode and initialize mdoe.
Normal Mode
Normal mode is the default mode of operation and the one you will use most of the time.
Use this mode for more tasks and configurations. Programs also are executed in this mode.
Initial mode is used to update the OS image and upgrade the firmware. If dip switch is set as
Init mode and reset the power, the I-8000 cannot boot up with autoexec.bat and will enter
OS operation mode, in this case there is no program running on the I-8000 and the 5-digital
7-SEG LEDs will count the number as shown below:
Item Default
IP Address 192.168.255.1
Subnet Mask 255.255.0.0
Gateway 192.168.0.1
MiniOS7 Utility is an easy-to-use network configuration Utility. You can use it to configure
the IP address of MiniOS7 devices easily.
Step 3: Choose the OS image name of I-8000 module (which comes with a default IP
address “192.168.255.1”) from the list and then click the “IP setting” from
toolbar
MiniOS7 Utility is a suite of tool for managing MiniOS7 devices (I-8000, μPAC-5000,
iPAC-8000, μPAC-7186,. etc.). Before uploading programs, make sure that MiniOS7 Utility is
installed on your PC.
For more information about how to install the MiniOS7 utility, see section 2.2.2., “Installing
the MiniOS7 Utility”
Before you use MiniOS7 Utility to upload programs, ensure that iPAC-8000 is connected to
PC. For more information on how to connect iPAC-8000 to PC, see section 2.1.2., “Wiring the
I-8000.”
The connection can be divided into the following three types according to the type of wire:
Step 4: Click the “New connection” function from the “Connection” menu
Step 5: On the “Connection” tab of the “Connection” dialog box, select “COM1”
from the drop down list, and then click “OK”
Connection Status
Before using the USB connection, ensure the I-7560 driver that you have installed. If they are
not installed, please refer to “section 2.1. Hardware Installation”.
Step 4: Click the “New connection” function from the “Connection” menu
Step 5: On the “Connection” tab of the “Connection” dialog box, select “COM3”
from the drop down list, and then click “OK”
Connection Status
Step 4: Click the “New connection” function from the “Connection” menu
Step 5: On the “Connection” tab of the “Connection” dialog box, select “UDP” from
the drop down list, type the IP address which you are assigned, and then
click “OK”
Connection Status
Before uploading and executing I-8000 programs, you must firstly establish a connection
between PC and I-8000, for more detailed information about this process, please refer to
section “2.5.1. Establishing a connection”
Step 1: On PC side, right click the file name that you wish to upload and then select
the “Upload”
Step 2: On the module side, right click the file name that you wish to execute and
then select the “Run”
After upload programs to the I-8000, if you need programs to start automatically after the
I-8000 start-up, it is easy to achieve it, to create a batch file called autoexec.bat and then
upload it to the I-8000, the program will start automatically in the next start-up.
The command can be either the file name “HELLO.exe” (run the specified file) or “runexe”
(run the last exe file)
iii. Save the file as autoexec.bat
For more detailed information about this process, please refer to section “2.5.2. Uploading
and Executing programs”
Before restaring the module for settings to take effect, you must firstly
disconnect the wire of Init and init*com.
When you learn every computer programming language you may realize that the first
program to demonstrate is "Hello World", it provides a cursory introduction to the
language's syntax and output.
C is prized for its efficiency, and is the most popular programming language for writing
applications.
Before writing your first I-8000 program, ensure that you have the necessary C/C++ compiler
and the corresponding functions library on your system.
The following is a list of the C compilers that are commonly used in the application
development services.
MSC
MSVC ++
If there is no compiler currently installed on your system, installation of the compiler should
be the first step.
Step 1: Double click the Turbo C++ executable file to start setup wizard
Step 4: Enter the path to the directory you wish to install files to
After installing the compiler, several compilers will be available from the Windows
Command line. You can set the path environment variable so that you can execute this
compiler on the command line by entering simple names, rather than by using their full path
names.
Step 1: Right click on the “My Computer” icon on your desktop and select the
“Properties” menu option
Right-click “My
Computer” and then
select “Properties”
Step 3: On the “Environment Variables” dialog box, click the “Edit” button located
in the “System variables” option
2
3
There are several APIs for customizing the standard features and integrating with other
applications, devices and services.
CD:\NAPDOS\8000\Common\MiniOS7\demo\LIB\
http://ftp.icpdas.com/pub/cd/8000cd/napdos/8000/common/minios7/demo/lib/
Before creating the application, ensure them that you have installed. If they are not installed,
please refer to “section 2.2. Installing Software”.
Here we assume you have installed the Turbo C++ 1.01 (as the section “3.1. C Compiler
Installation”) and the I-8000 APIs (as the section “2.2. Installing Software”) under the C
driver root folder.
2. Type “cmd”
Step 3: Select “New” from the “File” menu to create a new source file
#include <stdio.h>
#include “..\..\demo\Lib\8000E.h”
/* Include the header file that allows 8000E.lib functions to be used */
void main(void)
{
InitLib(); /* Initiate the 8000E library */
Print(“Hello world!\r\n”); /* Print the message on the screen */
}
You can write the code as shown below with your familiar text editor or
other tools; please note that
you must save the source code under a filename that terminates with
the extension “C”.
i. Select “Compiler” from the “Options” menu and then select “Code generation…”
ii. On “Model” option, select “Large”
iii. Select “OK”
i. Select “Compiler” from the “Options” menu and then select “Advanced code generation…”
ii. On “Floating Point” option, select “Emulation”
iii. On “Instruction Set” option, select “80186”
iv. Select “OK”
For more detailed information about this process, please refer to section “2.3. Configuring
the Boot Mode”
For more detailed information about this process, please refer to section “2.5.2. Uploading
and Executing Programs”
There are several APIs and demo programs that have been designed for I-8000.
You can examine the APIs and demo source code, which includes numerous functions and
comments, to familiarize yourself with the MiniOS7 APIs and quickly develop your own
applications quickly by modifying these demo programs.
This file contains the MiniOS7 API (Application Programming Interface) and has hundreds of
pre-defined functions related to μPAC-5000
This file contains the forward declarations of subroutines, variables, and other identifiers
used for the MiniOS7 API.
CD:\Napdos\MiniOS7\Document
http://ftp.Icpdas.com/pub/cd/8000cd/napdos/minios7/document/
CD:\NAPDOS\upac-5000\Demo\basic\
http://ftp.Icpdas.com/pub/cd/8000cd/napdos/upac-5000/demo/basic/
COM2
COM0
I-8k and I-87k I/O series modules for I/O Slot Applications
For more information about these demo programs, please refer to:
The I-8000 provides four built-in COM ports, COM1 , COM2, COM3 and COM4.
COM1 COM4
COM3
COM2
There are two types of functions below for using COM port.
(C style) Standard COM port functions only can be used with the COM1, if
you use the COM1 port, you’ll have the alternative of MiniOS7 COM
ports functions or (C style) Standard COM port functions. If you
choose the ones, then another cannot be used.
Summarize the results of the comparison between MiniOS7 COM port functions and (C style)
Standard COM port functions:
Types of
COM
Functio Buffer Functions
Port
ns
MiniOS7
1, 2, ReadCo printCom
COM 1 KB 1 KB IsCom() ToCom()
etc. m() ()
port
(C style)
Standar 512 256 Puts()
1 Kbhit() Getch() Print()
d COM Bytes Bytes Putch()
port
1. InstallCom()
Before any COM Port can be used, the driver must be installed by calling InstallCom().
2. RestoreCom()
If the program calls InstallCom(), the RestoreCom()must be called to release the COM
Port driver.
API for checking if there is any data in the COM port input buffer
3. IsCom()
Before reading data from COM port, the IsCom() must be called to check whether
there is any data currently in the COM port input buffer.
4. ReadCom()
After IsCom() confirms that the input buffer contains data, the ReadCom() must be
called to read the data from the COM port input buffer.
5. ToCom()
Before sending data to COM ports, the ToCom() must be called to send data to COM
ports.
#include <stdio.h>
#include “8000E.h”
void main(void)
{
int quit=0, data;
while(!quit)
{
if(IsCom(1)) /* Check if there is any data in the COM port input buffer */
{
data=ReadCom(1); /* Read data from COM1 port */
ToCom(1, data); /* Send data via COM1 port */
if(data==’q’) quit=1; /* If ‘q’ is received, exit the program */
}
}
RestoreCom(1); /* Release the COM1 */
6. printCom()
Functions such as printfCom() in the C library allow data to be output from COM
ports.
#include <stdio.h>
#include “8000E.h”
void main(void)
{
int i;
The standard COM port is used to upload program from PC to the µPAC-5000.
(C style) Standard COM port functions only can be used with the COM1
port, the following configurations of the COM1 port are fixed:
1. Kbhit()
Before reading data from standard I/O port, the kbhit() must be called to check
whether there is any data currently in the input buffer.
2. Getch()
After kbhit() confirms that the input buffer contains data, the Getch() must be called
to read data from the input buffer.
Before sending data to standard I/O port, the Puts() must be called to send data to
COM Port..
Before sending data to standard I/O port, the Putch() must be called to send data to
COM Port.
5. Print()
Functions such as Print() in the C library allow data to be output from the COM port.
#include<stdio.h>
#include “8000E.h”
void main(void)
{
int quit=0, data;
#include <stdio.h>
#include “8000E.h”
void main(void)
{
int i;
#include<stdio.h> #include<stdio.h>
#include “8000E.h” #include “8000E.h”
InitLib(); InitLib();
InstallCom(1, 115200, 8, 0, 1);
printCom(1,”Hits any key.\n”); Print("Hits any key.\n");
printCom(1,”Hit the ESC to exit!\n”); Print("Hits the ESC to exit !\n");
for(;;) for(;;)
{ {
if(IsCom(1)) if(kbhit())
{ {
item=ReadCom(1); item=Getch();
if(item==’q’) if(item==’q’)
{ {
return; return;
} }
else else
{ {
printCom(1,”----------\n\r”); Print(”----------\n\r”);
printCom(1,”char:”); Print(“char:“);
ToCom(1,item); Putch(item);
printCom(1,"\n\rASCII(%c)\n\r”,item); Print("\n\rASCII(%c)\n\r”,item);
printCom(1,“Hex(%02X)\n\r”,item); Print(“Hex(%02X)\n\r”,item);
Response
Request
Request Response
Debug information: Command1
c1
Command1
Debug information: Command2
c2
Command2
Q Debug information: Quick program
Other command Debug information: Unknown command
The I-8000 are equipped with a RS-485 communication interface, COM2, to access I-7K
series I/O modules for a wide range of RS-485 network application, as shown below.
RS-485
#include <stdio.h>
#include “8000E.h”
void main(void)
{
unsigned char InBuf0[60];
InitLib(); /* Initiate the 8000E library */
● The EEPROM contains 64 blocks (block 0 ~ 63), and each block has 256 bytes (address 0
~ 255), with a total size of 16,384 bytes (16K) capacity.
● The system program and OS are stored in EEPROM that are allocated as shown below.
2. EE_WriteProtect()
3. EE_MultiWrite()
4. EE_MultiRead()
The EE_WriteEnable() must be called to read data from the EEPROM no matter what
the current mode is.
void main(void)
{
int data=0x55, data2;
● MiniOS7 uses the last 64K bytes; the other parts of the memory are used to store user
programs or data.
● Each bit of the Flash memory only e can be written from 1 to 0 and cannot be written
from 0 to 1.
● Before any data can be written to the Flash memory, the flash must be erased, first
which returns all data to 0xFF, meaning that all data bits are set to “1”. Once there is
completed, new data can be written.
Free 0 x 8000
Free 0 x 9000
Free 0 x A000
Free 0 x B000
Free 0 x C000
Free 0 x D000
Free 0 x E000
MiniOS7 0 x F000
1. EraseFlash()
The only way to change the data from 0 to 1 is to call the EraseFlash() function to
erase a block from the Flash memory.
2. FlashWrite()
3. FlashRead()
The FlashRead() must be called to read data from the Flash Memory.
#include <stdio.h>
#include “8000E.h”
void main(void)
{
int data=0xAA55, data2;
char *dataptr;
int *dataptr2;
● The I-8000 is equipped with an RTC (Real Time Clock), 31 bytes of NVRAM can be used
to store data.
● NVRAM is SRAM, but it uses battery to keep the data, so the data in NVRAM does not
lost its information when the module is power off.
● NVRAM has no limit on the number of the re-write times. (Flash and EEPROM both
have the limit on re-write times) If the leakage current is not happened, the battery
can be used 10 years.
1. WriteNVRAM()
2. ReadNVRAM()
For example, use the following code to write data to the NVRAM address 0.
I-8000 Series (C Language Based) User Manual, Version 1.0.1 Page: 100
Copyright © 2012 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]
#include <stdio.h>
#include “8000E.h”
void main(void)
{
int data=0x55, data2;
InitLib(); /* Initiate the 8000E library */
WriteNVRAM(0,data);
data2=ReadNVRAM(0); /* Now data2=data=0x55 */
For example, the following can be used to write an integer (two bytes) to NVRAM.
I-8000 Series (C Language Based) User Manual, Version 1.0.1 Page: 101
Copyright © 2012 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]
#include <stdio.h>
#include “8000E.h”
void main(void)
{
int data=0xAA55, data2;
char *dataptr=(char *)&data;
I-8000 Series (C Language Based) User Manual, Version 1.0.1 Page: 102
Copyright © 2012 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]
4.6. API for 5-Digital LED
The I-8000 contains a 5-Digit 7-SEG LED with a decimal point on the right-hand side of each
digit, which be used to display numbers, IP addresses, time, and so on.
1. Init5DigitLed()
Before using any LED functions, the Init5DigitLed() must be called to initialize the
5-Digit 7-SEG LED.
2. Show5DigitLed()
After the Init5DigitLed() is used to initialize the 5-Digit 7-SEG LED, the Show5DigitLed()
must be called to display information on the 5-Digits 7-SEG LED.
For example, use the following code to display “8000E” on the 5-Digit 7-SEG LED.
I-8000 Series (C Language Based) User Manual, Version 1.0.1 Page: 103
Copyright © 2012 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]
#include <stdio.h>
#include “8000E.h”
void main(void)
{
InitLib(); /* Initiate the 8000E library */
Init5DigitLed();
Show5DigitLed(1,8);
Show5DigitLed(2,0);
Show5DigitLed(3,0);
Show5DigitLed(4,0);
Show5DigitLed(5,14); /* The ASCII code for the letter ‘E’ is 14 */
I-8000 Series (C Language Based) User Manual, Version 1.0.1 Page: 104
Copyright © 2012 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]
4.7. API for Timer
● The I-8000 can support a single main time tick, 8 stop watch timers and 8 counts down
timers.
● The I-8000 uses a single 16-bit timer to perform these timer functions, with a timer
accuracy of 1 ms..
1. TimerOpen()
Before using the Timer functions, the TimerOpen() must be called at the beginning of
the program.
2. TimerResetValue()
Before reading the Timer, the TimerResetValue() must be called to reset the main time
ticks to 0.
3. TimerReadValue()
After the TimerResetValue() has reset the main time ticks to 0, the TimerReadValue()
must be called to read the main time tick.
4. TimerClose()
Before ending the program, the TimerClose() must be called to stop the Timer.
I-8000 Series (C Language Based) User Manual, Version 1.0.1 Page: 105
Copyright © 2012 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]
For example, the following code can be used to read the main time ticks from 0.
#include <stdio.h>
#include “8000E.h”
void main(void)
{
Unsigned long time iTime;
I-8000 Series (C Language Based) User Manual, Version 1.0.1 Page: 106
Copyright © 2012 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]
4.8. API for WatchDog Timer (WDT)
● The I-8000 equips the MiniOS7, the small-cored operating system. MiniOS7 uses the
Timer 2 (A CPU internal timer) as system Timer. It is 16-bits Timer, and generate
interrupt every 1 ms. So the accuracy of system is 1 ms.
● The Watch Dog Timer is always enabled, and the system Timer ISR (Interrupt Service
Routine) refreshes it.
● The system is reset by WatchDog. The timeout period of WatchDog is 0.8 seconds.
1. EnableWDT()
The WDT is always enabled, before user’s programming to refresh it, the EnableWDT()
must be called to stop refreshing WDT.
2. RefreshWDT()
After EnableWDT() stop refreshing WDT, the RefreshWDT() must be called to refresh
the WDT.
3. DisableWDT()
I-8000 Series (C Language Based) User Manual, Version 1.0.1 Page: 107
Copyright © 2012 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]
For example, to refresh the Watchdog Timer.
#include <stdio.h>
#include “8000E.h”
void main(void)
{
Unsigned long time iTime;
I-8000 Series (C Language Based) User Manual, Version 1.0.1 Page: 108
Copyright © 2012 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]
5. I-8000 Updates
ICP DAS will continue to add additional features to OS and firmware of iPAC-8000 in the
future, so we advise you to periodically check the ICP DAS web site for the latest updates.
iPAC-8000 updates services provides a software update service for iPAC-8000. It can be
divided into two categories, OS updates and firmware updates.
Both the OS updates services and SDK updates services can be found separately on the CD
that was provided with the package or by downloading the latest version from ICP DAS web
site.
The OS image is stored in flash memory and can be updated to fix functionality issues or add
additional features, so we advise you to periodically check the ICP DAS web site for the latest
updates.
I-8000 Series (C Language Based) User Manual, Version 1.0.1 Page: 109
Copyright © 2012 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]
Step 2: Get the I-8000 OS image
The I-8000 OS image can be found separately on the CD that was provided with the package
or by downloading the latest version from ICP DAS web site.
CD:\NAPDOS\8000\841x881x\OS_image\40M\
http://ftp.Icpdas.com/pub/cd/8000cd/napdos/8000/841x881x/os_image/40m/
CD:\NAPDOS\8000\843x883x\TCP\Xserver\OS_image\40M\
http://ftp.Icpdas.com/pub/cd/8000cd/napdos/8000/843x883x/tcp/xserver/os_image/40m/
I-8000 Series (C Language Based) User Manual, Version 1.0.1 Page: 110
Copyright © 2012 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]
For I-8431-80/I-8831-80 ethernet embedded controller:
CD:\NAPDOS\8000\843x883x\TCP\Xserver\OS_image\80M\
http://ftp.Icpdas.com/pub/cd/8000cd/napdos/8000/843x883x/tcp/xserver/os_image/80m/
For more detailed information about this process, please refer to section “2.4.1. Establishing
a connection”
Step 4: Click the “Update MiniOS7 Image …” from the “File” menu
I-8000 Series (C Language Based) User Manual, Version 1.0.1 Page: 111
Copyright © 2012 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]
Step 5: Select the latest version of the MiniOS7 OS image
I-8000 Series (C Language Based) User Manual, Version 1.0.1 Page: 112
Copyright © 2012 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]
Step 7: Click the “Info” from the “Command” menu to check the version of the OS
image
I-8000 Series (C Language Based) User Manual, Version 1.0.1 Page: 113
Copyright © 2012 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]
Appendix A. What is MiniOS7?
DOS is a set of commands or code that tells the computer how to process
information. DOS runs programs, manages files, controls information
processing, directs input and output, and performs many other
related functions.
Feature MiniOS7
Power-up time 0.1 sec
More compact size < 64 K bytes
Support for I/O expansion bus Yes
Support for ASIC key Yes
Flash ROM management Yes
OS update (Upload) Yes
Built-in hardware diagnostic functions Yes
Direct control of 7000 series modules Yes
Customer ODM functions Yes
Free of charge Yes
I-8000 Series (C Language Based) User Manual, Version 1.0.1 Page: 114
Copyright © 2012 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]
Appendix B. What is MiniOS7 Utility?
Upload location:
http://ftp.Icpdas.com/pub/cd/8000cd/napdos/minios7/utility/minios7_utility/
I-8000 Series (C Language Based) User Manual, Version 1.0.1 Page: 115
Copyright © 2012 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]
Appendix C. More C Compiler Settings
I-8000 Series (C Language Based) User Manual, Version 1.0.1 Page: 116
Copyright © 2012 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]
C.1. Turbo C 2.01
CD:\8000\NAPDOS\8000\841x881x\Demo\hello\Hello_C\gotc.bat
tcc -Ic:\tc\include -Lc:\tc\lib hello1.c ..\..\lib\8000e.lib
I-8000 Series (C Language Based) User Manual, Version 1.0.1 Page: 117
Copyright © 2012 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]
Step 3: Save the project and entering a name, such as LED.prj
Step 5: Change the Memory model (Large for I-8000.lib) and set the Code
Generation to 80186/80286
I-8000 Series (C Language Based) User Manual, Version 1.0.1 Page: 118
Copyright © 2012 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]
Step 6: Building the project
I-8000 Series (C Language Based) User Manual, Version 1.0.1 Page: 119
Copyright © 2012 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]
C.2. BC++ 3.1. IDE
I-8000 Series (C Language Based) User Manual, Version 1.0.1 Page: 120
Copyright © 2012 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]
Step 4: Change the Memory model (Large for 8000e.lib)
Step 5: Set the Advanced code generation options and Set the Floating Point to
Emulation and the Instruction Set to 80186
I-8000 Series (C Language Based) User Manual, Version 1.0.1 Page: 121
Copyright © 2012 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]
Step 6: Set the Entry/Exit Code Generation option and setting the DOS standard
I-8000 Series (C Language Based) User Manual, Version 1.0.1 Page: 122
Copyright © 2012 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]
Step 8: Make the project
I-8000 Series (C Language Based) User Manual, Version 1.0.1 Page: 123
Copyright © 2012 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]
C.3. MSC 6.00
Step 1: In the source file folder, create a batch file called Gomsc.bat using the text
editor
I-8000 Series (C Language Based) User Manual, Version 1.0.1 Page: 124
Copyright © 2012 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]
Step 2: Run the Gomsc.bat file
I-8000 Series (C Language Based) User Manual, Version 1.0.1 Page: 125
Copyright © 2012 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]
C.4. MSVC 1.50
Step 2: Create a new project (*.mak) by entering the name of the project in the
Project Name field and then select MS-DOS application (EXE) as the Project
type
I-8000 Series (C Language Based) User Manual, Version 1.0.1 Page: 126
Copyright © 2012 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]
Step 3: Add the user's program and the necessary library files to the project
I-8000 Series (C Language Based) User Manual, Version 1.0.1 Page: 127
Copyright © 2012 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]
Step 5: Change the Memory model (large for 8000e.lib)
I-8000 Series (C Language Based) User Manual, Version 1.0.1 Page: 128
Copyright © 2012 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]
Step 6: Remove the xcr, afxcr library from the Input Category
I-8000 Series (C Language Based) User Manual, Version 1.0.1 Page: 129
Copyright © 2012 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]
Step 8: Rebuild the project
I-8000 Series (C Language Based) User Manual, Version 1.0.1 Page: 130
Copyright © 2012 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]