Lanner LEC-7230 User Manual

Embedded & Industrial Computing
Hardware Platforms for Embedded and Industrial Computing
LEC-7230 V1.0
>>
User's Manual
About
About
Overview
Icon Descriptions
The icons are used in the manual to serve as an indication of interest topics or important messages. Below is a description of these icons:
NOTE: This check mark indicates that
there is a note of interest and is something that you should pay special attention to while using the product.
Online Resources
The listed websites are links to the on-line product information and technical support.
Resource Website
Lanner http://www.lannerinc.com
Product Resources
RMA http://eRMA.lannerinc.com
WARNING: This exclamation point
indicates that there is a caution or warning and it is something that could damage your property or product.
http://www.lannerinc.com/ download-center/
Acknowledgement
Intel, Pentium and Celeron are registered trademarks of Intel Corp.
Microsoft Windows and MS-DOS are registered trademarks of Microsoft Corp.
All other product names or trademarks are properties of their respective owners.
Compliances and Certification
CE Certication
This product has passed the CE test for environmental specifications. Test conditions for passing included the equipment being operated within an industrial enclosure. In order to protect the product from being damaged by ESD (Electrostatic Discharge) and EMI leakage, we strongly recommend the use of CE-compliant industrial enclosure products.
FCC Class A Certication
This equipment has been tested and found to comply with the limits for a Class A digital device, pursuant to Part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference when the equipment is operated in a commercial environment. This equipment generates, uses and can radiate radio frequency energy and, if not installed and used in accordance with the instruction manual, may cause harmful interference to radio communications. Operation of this equipment in a residential area is likely to cause harmful interference in which case the user will be required to correct the interference at his own expense.
Copyright and Trademarks
This document is copyrighted, © 2014. All rights are reserved. The original manufacturer reserves the right to make improvements to the products described in this manual at any time without notice.
No part of this manual may be reproduced, copied, translated or transmitted in any form or by any means without the prior written permission of the original manufacturer. Information provided in this manual is intended to be accurate and reliable. However, the original manufacturer assumes no responsibility for its use, nor for any infringements upon the rights of third parties that may result from such use.
Embedded and Industrial Computing
2
TTaTTable of Contentsbeable of Contents
Chapter 1: Introduction 4
System Specications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Package Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Standard Accessories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Optional Power Cords. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Optional Mounting Kit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Optional Accessories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Chapter 2: System Components 6
System Drawing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Front Components. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Rear Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Chapter 3: Board Layout 10
External Connectors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10
Internal Connectors and Jumpers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11
Connectors and Jumpers List. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12
Jumper Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13
Appendix A: Programming Watchdog Timer 16
Appendix B:
Appendix C:
Digital Input/Output Control on the GPIO port 21
Terms and Conditions 23
Warranty Policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23
RMA Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23
3
Chapter 1

Chapter 1: Introduction

Introduction
Thank you for choosing the LEC-7230. The LEC-7230 features Intel Celeron N2930 (or E3825 or E3845) processor. It has dual LAN as well as HDMI and VGA connectors for high demand of Internet and multimedia applications. In addition, its fanless design reduces maintenance effort and attributes its longevity.
The following highlight the capabilities of the LEC-7230 system:
Dual HDMI and VGA video output powered by Intel HD Graphics
Dual 10/100/1000 Mbps LAN
Three USB (two USB 2.0 ports and one USB 3.0 port) and one Digital Input/Output connector (2 digital inputs and 2 digital outputs)
Storage support of 2.5" SATA HDD and CompactFlash
Power-on switch through the Phoenix connector for distant power-on/off control
Two RS232/422/485 serial ports supporting hardware auto-flow control with DB-9 connectors
Audio input and output through Mic-in and Line-out jack
Aluminum extrusion enclosure which helps heat dissipation
Fanless design which can sustain the operating temperature from -20-55°C

System Specifications

Processor Options
Chipset None
BIOS AMI SPI Flash BIOS
System Memory
USB
Digital I/O
Expansion Bus
OS Support Microsoft Windows 8
Storage
Networking
Display
LEDs Power, HDD active, 3G active
Physical Characteristics
Environment
Power
Standard and Regulation
Reliability
Sockets 1 x 204-pin SODIMM socket
Technology DDR3L 1066 MHz
Max. Capacity Up to 4 GB
HDD/SSD Support 1 x 2.5” HDD/SSD drive bay
Expansion
LAN
Controller Intel i210 x 2
Graphics Controller
Display Interface
Housing Aluminum
Weight 1 kg
Dimensions (WxHxD)
Mounting Options
Operation Temperature
Storage Temperature -20~70°C
Ambient Relative Humid­ity (non-condensing)
Input Voltage +12 V DC
Power Consumption 19 W
Connector DC jack with lock
AC Adapter 60 W, 12 V/5 A
EMC CE/FCC
Green product RoHS
Alter tool
Automatic Reboot Trigger
Intel® Celeron® N2930/E3825/ E3845 4C (2 GHz) CPU
2 x USB 2.0, 1x USB 3.0 compliant hosts: Type A connector
2 x DI or 2 x DO with +5V TTL Level
Mini-PCIe x 1, with SIM card reader
1 x CF type I/II socket, 1x SATA port for 1 x 2.5” SSD/HDD drive bay 2 x 10/100/1000Mbps, Autosensing,RJ-45
Intel® integrated Graphics Media Accelerator
VGA x 1 (1600x1200), HDMI x1 (1920x1080)
198 x 42 x 144.8 mm (7.79” x
1.65” x 5.7”) Rack, VESA, DIN-rail and Wall mount
-20~55°C (with Industrial grade components)
5 to 95% (non-condensing)
Built-in buzzer and RTC (real-time clock) with battery lithium backup Watchdog Timer 1~255 level time interval system reset, software programmable
Embedded and Industrial Computing
4
Chapter 1

Package Contents

Your package contains the following items:
LEC-7230 Fanless Embedded System
Power Adapter (P/N: 0P0W060122033)
Drivers and User’s Manual CD (S09OADA64H100)
2-pin Terminal Block (P/N: 04AW20023Z101)
6-pin Terminal Block (P/N: 04AW20061Z101)

Standard Accessories

080W1N0002001 SATA SSD/HDD cable w/ power
0P0W060120001 AC Power Adapter 60 W 12V/5A, DC Jack with lock

Optional Power Cords

080W240318306 US Power Cord
080W240318305 Schuko (EU) Power Cord
080W240318301 UK Power Cord
080W240318307 China Power Cord
080W240318309 Japan Power Cord
Introduction

Optional Mounting Kit

SE9ESA900R100 Wall Mount 4
PE9ESA8300100 VESA Mount
SE9ESA8310100 Rack Mount
090W405000001 DIN Rail Mount

Optional Accessories

0TAWQ802XKZ03 Wi-Fi module Wi-Fi Module, 802.11 b/g/n Mini-PCIe
080W1Q0001501 Antenna Internal Wi-Fi Antenna Cable
0TZW000000039 Antenna SMA Antenna, male jack / female plug
080W0Q0000501 Antenna Internal Antenna cable for 3G//GPS
0TZW000000072 Antenna 3G Module External Antenna
card
module
Embedded and Industrial Computing
5
Chapter 2

Chapter 2: System Components

System Drawing

Mechanical dimensions of the LEC-7230
Unit: mm
System Components
144.8
48
198
42
Embedded and Industrial Computing
6
Chapter 2
SIO
DDR3L
SO-DIMM
Up to 4G
Audio Codec
SP339E
UART X 2
MIO
Design Reservation
PCIe x 1
USB2.0
Line-out
and Mic-in
Jack
DB9
RS232/422/485
x2
RS232
Pin Header
Digital I/O
DI x 2
DO x 2
VGA HDMI

Block Diagram

The block diagram depicts the relationships among the interfaces and modules on the motherboard..
SATA
SATA
2.0
System Components
CF
SPIF223A
Mini-PCIe with
SIM Card
Reader
USB 2.0
PCIe
SATA
2.0
1 x USB 3.0
Connector
Intel® Celeron™ processor
N2930 4C (2 GHz) CPU
USB
2.0/3.0
2x USB 2.0 connectors
2x PCI-E x1
Intel I210
Intel I210
Embedded and Industrial Computing
7
Chapter 2

Front Components

F1 Reset Reset switch
F2 MIC IN/LINE OUT Connect the audio devices to these ports. The
F3 USB 3.0 Port
F4 Two USB 2.0 Ports An USB 2.0 type A connector.
System Components
F1
Component Description Pin Definition
F2
F3
F4
Microphone and line out port are provided by Realtek ALC
886-GR.
F5
F7
F6
An USB 3.0 type A connector.
F8
Reference
USB2 on page 14 USB1 on page 14
F5 Two 10/100/1000Mbps LAN ports Two RJ-45 (network) jacks with LED indicators
as described below. Both LAN ports are provided by Intel 82583V. The 82583V supports PXE remote boot
LINK/ACT
F6 HDD (Yellow)
3G Status (Green) and
Power LED (Green)
SPEED
LINK/ACT (Yellow)
On/Flashing: The port is linking and active • in data transmission.
Off: The port is not linking.•
SPEED (Green/Yellow)
Yellow: The connection speed is • 1000Mbps.
Green: The connection speed is 100Mbps•
Off: The connection speed is 10Mbps.•
HDD
Blinking: data access activities•
Off: no data access activities•
3G Status
Blinking: 3G transmission activities•
On: 3G expansion card exists•
Off: no 3G expansion card exists•
Power
On: The computer is on.•
Off: The computer is off .•
F7 Power-on Switch A power-on switch through the Phoenix
PSBTN2 on page 15
contact for distant power-on/off control
Embedded and Industrial Computing
F8 Power Button with dual LED ATX Power-on button with LEDs: Standby
mode in Red; Power-on mode in Green
8
Chapter 2

Rear Components

System Components
R1
Component Description Pin Definition Reference
R1 HDMI The HDMI (High-Denition Multimedia Interface).
R2 VGA Port
R2
This port can support up to 1920x1080 resolution. The displays can support VGA up to 1600x1200
resolution.
R3
R4
R3 DIO Digital Input/Output Connector 2 DI and DO
connections
R4 Serial Ports The serial port consists of a 9-pin,
RS232/422/485 configured with automatic hardware flow control D-SUB connector that allows the connection of a serial peripheral. To switch among RS232/422/485, use the BIOS menu.
R5 Power Adapter Socket DC-in 12V. Only use the power adapter supplied with
the LEC-7230 System
R5
HDMI1 on page 14
VGA1 on page 14
DIO1 on page 15
COM1/COM2 on page 13
DC_IN1 on page 15
Embedded and Industrial Computing
9
Chapter 3

Chapter 3: Board Layout

External Connectors

The following picture highlights the location of the external ports. Refer to the table 3.1 Connector List for more details.
Board Layout
HDMI1
VGA1
DIO1
COM1
COM2
PSBTN2
Embedded and Industrial Computing
LAN1
LAN2
USB1
USB2
LOUT1
MIC1
10
Chapter 3

Internal Connectors and Jumpers

The following picture highlights the location of internal connectors and jumpers. Refer to the table 3.1 Connector List for more details.
JCMOS1
JLPC1
JSPI1
JRI1
JRI2
JCOM1
Board Layout
JCOM2
Embedded and Industrial Computing
SATA1
SATAPWR1
CF1
JKBMS1
11
Chapter 3
Board Layout

Connectors and Jumpers List

The tables below list the function of each of the board jumpers and connectors by labels shown in the above section. The next section in this chapter gives pin definitions and instructions on setting jumpers.
Table 3.1 Connector List for LEB-7230 Board
Labels Function Pin Denition Refer-
ence Page
CF1 CompactFlash Connector P15 COM1/COM2 RS232 Serial Ports COM1 and COM2 P13 DIO1 Digital Input/Output P15 HDMI1 High-Denition Multimedia Interface Port P14 JCMOS1 Clear CMOS Jumper P14 JCOM1/2 RS232 Pin Headers P13 JKBMS1 PS/2 Keyboard & Mouse Connector P15 JLPC1 Low-pin Count Interface Reserved for Factory Use JRI1/2 COM1/COM2 Pin 9 Signal Selection P13 JSPI1 SPI ROM Interface (for debug use only) Reserved for Factory Use MPCIE1 Mini-PCIe Connectors (with SIM1) P15 PSBTN2 Power Button with Phoenix Connector P15 SATA1 Serial-ATA Connector (SATA1) P14 SATAPWR1 SATA HDD Power Connector P14 SIM1 SIM Card Reader P15 USB1 USB 2.0 Type A Dual Port P14 USB2 USB 3.0 Type A Port P14 VGA1 VGA Connector P14
Embedded and Industrial Computing
12
Chapter 3
Board Layout

Jumper Settings

RS-232 Pin Headers (JCOM1/2): It is a RS-232 serial communication interface Connector
10
8 6 4 2
Pin No. Signal
1 Data Carrier Detect ( DCD # ) 2 Receive Data ( RXD ) 3 Transmit Data ( TXD ) 4 Data Terminal Ready ( DTR # ) 5 Ground ( GND ) 6 Data Set Ready ( DSR # ) 7 Request To Send ( RTS # ) 8 Clear To Send ( CTS # ) 9 Ring Indicator ( RI # )
9 7 5 3 1
2
1
RS-232
10
9
Select COM1/COM2 Pin 9 Function (JRI1/JRI2): The pin 9 of COM1 and COM2 can be altered by JRI1 and JRI2 respectively according to the following jumper settings.
JRI1: COM1 JRI2: COM2
Default
+5V
+12V
2 4 6
1 3 5
2 4 6
2 4 6
1 3 5
6 4 2
6 4 2
6 4 2
5 3 1
5 3 1
5 3 1
RS-232/422/485 Serial Port (COM1 and COM2): It is an RS-232/422/485 port with automatic hardware flow control through a D-SUB9 connector.
12345
Pin No. Signal
1 Data Carrier Detect ( DCD # ) 2 Receive Data ( RXD ) 3 Transmit Data ( TXD ) 4 Data Terminal Ready ( DTR # ) 5 Ground ( GND ) 6 Data Set Ready ( DSR # ) 7 Request To Send ( RTS # ) 8 Clear To Send ( CTS # ) 9 Ring Indicator ( RI # )
Pin No. Signal
RS-422
1 TXD­2 TXD+ 3 RXD+ 4 RXD­5 GND
6789
RS-232
Pin No. Signal
1 DATA­2 DATA+ 3 4 5
RS-485
GND
Jumper Setting
Function
RI# (default) 1-2
+5V 3-4
+12V 5-6
SW1/SW4
Note: To switch among RS-232, 422, 485 communication protocols, use the BIOS menu.
Embedded and Industrial Computing
13
Chapter 3
Board Layout
Clear CMOS jumper (JCMOS1): It is for clearing the CMOS settings.
1 2 3
Pin No. Signal
1-2 Normal (Default) 2-3 Clear CMOS
VGA (VGA1)
11 12 13 14 15
1 2 3 4 5
Pin Signal Pin Signal Pin Signal
1 Red Color
Signal
2 Green Color
Signal
3 Blue Color
Signal 4 Reserved 9 +5V 14 VSYNC 5 GND 10 GND 15 DDC CLK
6 GND 11 NC
7 GND 12 DDC DATA
8 GND 13 HSYNC
Serial-ATA Connector (SATA1): It is for connecting a 2.5’’ harddisk to serve as your system’s storage. It can support SATA II which features Data transfer rates up to 3.0 Gb/s (300 MB/s).
Pin No. Signal
1 GND 2 TX0_P 3 TX0_N 4 5 RX0_N 6 RX0_P 7
GND
GND
SATA1
7 6 5 4 3 2 1
4-pin Serial-ATA Power Connector (SATAPWR1): It is for connecting the SATA power cord.
1 2 3 4
Pin No. Signal
1 12V 2 3 GND 4 +5V
GND
Dual USB 2.0 Port (USB1):
Dual USB 3.0 Port (USB2)
HDMI Connector (HDMI1): High-Definition Multimedia
Interface Connector
19 1
18 2
Pin Signal Pin Signal
1 DATA2+ 2 GND 3 DATA2- 4 DATA1+ 5 GND 6 DATA1­7 DATA0+ 8 GND 9 DATA0- 10 CLK+
11 13 N.C 14 N.C 15 17 GND 18 HDMI_VCC 19 HPD
GND 12 CLK-
DDC CLK 16 DDC DAT
1 2 3 4
5 6 7 8
Pin No. Signal
1 +5V 2 3 DATA+ 4 GND 5 SSRX­6 SSRX+ 7 GND 8 SSTX­9 SSTX+
DATA-
Embedded and Industrial Computing
14
Chapter 3
Board Layout
Power-on Switch through Phoenix Contact (PSBTN2): A Phoenix connector for distant power switch.
1 2
Pin No. Signal
1 PWRBTN# 2
GND
Digital Input/Output Connector (DIO1)
5 1
6 2
Pin NO. Signal Pin NO. Signal
1 DIO_IN1 2 DIO_IN2 3 DIO_OUT1 4 DIO_OUT2 5 +5V 6 GND
TTL Level is +5V; Maximum input/output current for each port is 10mA/100mA For all Input/ output pins:
Voltage Logic Register DI: < 0.8V
Low 0 Do: <0.4V DI: >3.5V
High 1 Do: 5V
The default value is DI=0, DO=1
Mini PCI Express Connector (for 3G card with PCI Express 1X and USB 2.0 signals and a SIM card reader, MPCIE1):
PIN Signal PIN Signal
1 WAKE# 2 +3.3Vaux 3 COEX1 4 5 COEX2 6 +1.5V 7 CLKREQ# 8 UIM_PWR
9 11 REFCLK- 12 UIM_CLK 13 REFCLK+ 14 15 GND 16 UIM_VPP
17 19 RSVD 20 W_DISABLE# 21 GND 22 PERST# 23 PERn0 24 +3.3Vaux 25 PERp0 26 27 GND 28 +1.5V 29 31 PETn0 32 SMB_DATA 33 PETp0 34 GND 35 GND 36 USB_D­37 GND 38 USB_D+ 39 +3.3Vaux 40 GND 41 +3.3Vaux 42 LED_WWAN# 43 GND 44 LED_WLAN# 45 RSVD 46 LED_WPAN# 47 RSVD 48 +1.5V 49 51 RSVD 52 +3.3Vaux
GND 10 UIM_DATA
Key
RSVD 18 GND
GND 30 SMB_CLK
RSVD 50 GND
GND
UIM_RESET
GND
PS/2 Keyboard and Mouse Connector (JKBMS1)
1 3 5 7
Pin NO. Description Pin NO. Description
1 VCC 2 MSCLK 3 MSDATA 4 KEY 5
KBDATA 6 KEY
7
GND 8 KBCLK
2 4 6 8
SIM Card Reader (SIM1)
C5
C7
Pin NO. Signal Pin NO. Signal
C1 UIM_PWR C5 GND C2 UIM_RST# C6 UIM_VPP C3 UIM_CLK C7
C1
C3
UIM_DATA
CF Connector (CF1)
Pin No. Signal Pin No. Signal
1 GND 26 -CD1 2 D3 27 D11 3 D4 28 D12 4 D5 29 D13 5 D6 30 D14 6 D7 31 D15 7 -CS0 32 -CS1 8 A10 (GND) 33 -VS1
9 ATA_SEL# 34 -IORD 10 A9 (GND) 35 -IOWR 11 12 13 VCC 38 VCC 14 15 A5 (GND) 40 -VS2 16 A4 (GND) 41 -RESET 17 A3 (GND) 42 IORDY 18 A2 43 DMARQ 19 A1 44 -DDACK 20 A0 45 -DASP 21 D0 46 -PDIAG 22 D1 47 D8 23 D2 48 D9 24 -IOCS16 49 D10 25 -CD2 50 GND
A8 (GND) 36 -WE A7 (GND) 37 INTRQ
A6 (GND) 39 -CSEL
Embedded and Industrial Computing
15
Appendix A
Programming Watchdog Timer

Appendix A: Programming Watchdog Timer

A watchdog timer is a piece of hardware that can be used to automatically detect system anomalies and reset the processor in case there are any problems. Generally speaking, a watchdog timer is based on a counter that counts down from an initial value to zero. The software selects the counter’s initial value and periodically restarts it. Should the counter reach zero before the software restarts it, the software is presumed to be malfunctioning and the processor’s reset signal is asserted. Thus, the processor will be restarted as if a human operator had cycled the power.
For sample watchdog code, see Watch dog and DIO folder in the Driver and Manual CD
Click the Setup program.1.
The welcome screen appears. Click Next to proceed.2.
Driver Installation
Before you could access or control the operation of the watchdog and Digital I/O functions, install the the L_IO driver which is the library and driver needed for Lanner General Purpose Input/Output interface or functions.
To install the L_IO driver:
Restart the computer, and then log on with 1. Administrator privilege.
Insert the Drivers and User’s Manual CD to the USB-2. optical drive.
Browse the contents of the support CD to locate the 3. file LannerIO v101.rar under the \WD_DIO\ folder and unzip the file.
Click the Setup program in the unzipped folder.4.
The installation process proceeds. Click Close when the 3. process completes.
Embedded and Industrial Computing
16
Appendix A
Programming Watchdog Timer
To verify the GPIO driver installation, do the following steps:
Right-click on the My Computer icon, and then select 1. Properties form the menu.
Click the Hardware tab, then click the Device Manager 2. button.
Select 3. View from the menu and select show hidden devices .
The Lanner common GPIO driver should be listed 4. under the Non-Plug and Play Drivers. If not, click the San for hardware changes button from the tool bar.
Sample Program
You can write your own program by modifying the source code F81865_Test.cpp.. The index address is 2EH.
///////////////////////////////////////////////////////////////////// ////
// F81865_Test.cpp : F81865_test.exe utility for F81865.lib APIs demonstration.
//
// History:
// 7/15/2011 Brand new F81865_test program.
#include <winsock2.h>
#include “Windows.h”
#include “stdio.h”
#include “F81865.h”
#define PARAMETER_HELP “\n”\
“The F81865 GPIO utility of Lanner\n”\
“-------------------------------------\n”\
“Usage:\n”\
“ F81865_test DIO_IN port_ number\n”\
“ F81865_test DIO_OUT port_number value\n”\
“ F81865_test PIO port_number value\n”\
“ F81865_test RunLED port_number value\n”\
“ F81865_test AlarmLED port_number value\n”\
“ F81865_test GPS_LED port_number value\n”\
“ F81865_test WirelessLED port_number value\n”\
“ F81865_test WatchDog seconds\n”\
Embedded and Industrial Computing
“ F81865_test CaseOpen\n”\
“ F81865_test CaseOpen_Clear\n”\
17
Appendix A
Programming Watchdog Timer
“ F81865_test Sleep milliseconds\n”\
“\n”\
“Argement:\n”\
“ DIO_IN Read state from DIO In.\n”\
“ DIO_OUT Set DIO Out state.\n”\
“ PIO Set PIO LED state.\n”\
“ RunLED Set RUN LED state.\n”\
“ AlarmLED Set Alarm LED state.\n”\
“ GPS_LED Set GPS LED state.\n”\
“ WirelessLED Set Wireless LED state.\n”\
“ Watchdog Set Watchdog timer.\n”\
“ CaseOpen Check case opened state.\n”\
“ CaseOpen_Clear Clear case open state.\n”\
“ port_number The port number.\n”\
“ value 1 for on and 0 for off.\n”\
“ seconds The watchdog count down seconds. 0 for disable.\n”\
“ milliseconds Milliseconds to delay\n”
#define RETMSG(a,b) {printf (b) ; return a;}
#define CHECK_ARGC(a) {if (argc != a) throw PARAMETER_HELP ;}
// Translate Hex string to a long value LONG Hex2Long (char *str) { LONG nLong ;
if (scanf (str, “%x”, &nLong) != 1) throw “Error parsing parameter\n” ;
return nLong ; }
// Make sure the argument is numeric void CheckNumeric (char *szBuf) { int nLen = strlen (szBuf) ;
for (int i = 0 ; i < nLen ; i++) if (!strchr (“01234567890ABCDEFabcdef”, szBuf[i]) ) throw “Wrong argument\n” ; }
// Common GPIO output function definition #define GPIO_OUT(a,b,c) \ int a (int argc, char *argv[]) \ { \ CHECK_ARGC (4) ; \
CheckNumeric (argv[2]) ; \
CheckNumeric (argv[3]) ; \
\
int nPort = atoi (argv[2]) ; \
int nValue = atoi (argv[3]) ; \
\
c (nPort, nValue) ; \
\
printf (b “ #%d = %d\n”, nPort, nValue) ; \
\
return 0 ; \ }
// Function generate by common function definition GPIO_OUT (mDIO_ OUT , “DIO_OUT” , Write_DIO) G P I O _ O U T (mPIO , “DIO_OUT” , PIO) G P I O _ O U T (mRunLED , “RunLED” , RunLED) G P I O _ O U T (mAlarmLED , “AlarmLED” , AlarmLED) GPIO_OUT (mGPS_ LED , “GPS_LED” , GPS_LED)
Embedded and Industrial Computing
18
Appendix A
G P I O _ O U T (mWirelessLED , “WirelessLED” , WirelessLED)
Programming Watchdog Timer
printf (“DIO_IN #%d = %d\n”, nPort, ret) ;
// Check case open
int mCaseOpen (int argc, char* argv[])
{
CHECK_ARGC (2) ;
BOOL bOpen = CaseOpen () ;
printf (“Case is %s\n”, bOpen ? “Open” : “Close”) ;
return bOpen ;
}
// Clear case open state
int mCaseOpen_Clear (int argc, char* argv[])
{
CHECK_ARGC (2) ;
return ret ; }
// Milli-second delay
int mSleep (int argc, char *argv[])
{
CHECK_ARGC (3) ;
CheckNumeric (argv[2]) ;
Sleep (atoi (argv[2]) ) ;
return 0 ;
}
CaseOpen_Clear () ;
BOOL bOpen = CaseOpen () ;
printf (“CaseOpen state %s”, bOpen ? “not cleared” : “cleared”) ;
return bOpen ;
}
// Get DIO_IN state
int mDIO_IN (int argc, char* argv[]) { CHECK_ARGC (3) ;
CheckNumeric (argv[2]) ;
// Watchdog
int mWatchDog (int argc, char *argv[])
{
if (argc != 3 && argc != 2)
RETMSG (-1, PARAMETER_HELP) ;
if (argc == 3)
{
CheckNumeric (argv[2]) ;
int nValue = atoi (argv[2]) ;
WatchDog_Enable (nValue) ;
}
int nLeft = WatchDog_GetLeft () ;
int nPort = atoi (argv[2]) ;
BOOL ret = Read_DIO (nPort) ;
Embedded and Industrial Computing
printf (“Watchdog timer left %d seconds\n”, nLeft) ;
19
Appendix A
Programming Watchdog Timer
{
return nLeft ;
}
// Argument - function mapping
typedef struct
{
char *szCmd ;
int (*function) (int argc, char *argv[]) ;
} CMD2FUN ;
CMD2FUN c2f[] =
{
{“DIO_IN” , mDIO_IN },
{“DIO_OUT” , mDIO_OUT },
{“PIO” , mPIO },
{“RunLED” , mRunLED },
{“AlarmLED” , mAlarmLED },
// The total argument allowed
int num = sizeof (c2f) / sizeof (c2f[0]) ;
// Too few argument
if (argc < 2)
RETMSG (-1, PARAMETER_HELP) ;
// Find the match argument and execute the mapping function
for (int i = 0 ; i < num ; i++)
if (stricmp (argv[1], c2f[i].szCmd) == 0)
return c2f[i].function (argc, argv) ;
// No match argument
RETMSG (-1, “Wrong Argument\n”) ;
}
catch (char *str)
{
// Output the error message
printf (“\n%s\n”, str) ;
}
{“GPS_LED” , mGPS_LED },
{“WirelessLED” , mWirelessLED },
{“CaseOpen” , mCaseOpen },
{“CaseOpen_Clear”,mCaseOpen_Clear},
{“Watchdog” , mWatchDog },
{“Sleep” , mSleep }
} ;
// Program start here
int main(int argc, char *argv[])
{
try
Embedded and Industrial Computing
catch (...)
{
// Unknown exception
printf (“\nUnknown Exception\n”) ;
}
return -1 ;
}
20
Appendix B
Digital Input/Output Control

Appendix B: Digital Input/Output Control on the GPIO port

The Digitanl I/O on the panel is designed to provide the input and output operations for the system. For sample DIO code, see Watch dog and DIO in the Driver and Manual CD.
Driver Installation
Before you could access or control the operation of the watchdog and Digital I/O functions, install the the L_IO driver which is the library and driver needed for Lanner General Purpose Input/Output interface or functions.
To install the L_IO driver:
Restart the computer, and then log on with 1. Administrator privilege.
Insert the Drivers and User’s Manual CD to the USB-2. optical drive.
Click the Setup program.1.
The welcome screen appears. Click Next to proceed.2.
Browse the contents of the support CD to locate the 3. file LIO.rar under the \Watch dog and DIO\LIO folder and unzip the file.
From the control panel, click the ADD Hardware 4. program
The installation process proceeds. Click Close when the 3. process completes.
Embedded and Industrial Computing
21
Appendix B
Digital Input/Output Control
To verify the GPIO driver installation, do the following steps:
Right-click on the My Computer icon, and then select 1. Properties form the menu.
Click the Hardware tab, then click the Device Manager 2. button.
Select 3. View from the menu and select show hidden devices .
The Lanner common GPIO driver should be listed 4. under the Non-Plug and Play Drivers. If not, click the San for hardware changes button from the tool bar.
Executing the Sample Program:
To test the sample program, execute the F81865_test with the appropriate parameters.
DIO:
Usage:
F81865_test DIO_In port_number (reads Digital input port 0, 1, 2 or 3)
F81865_test DIO_Out port_number value (writes Digital output port 0, 1, 2 or 3; For port description, refer to Jumper Settings on Chapter3 Board Layout)
You can also write your own program by modifying the source code F81865_Test.cpp.. The index address is 2EH.
Embedded and Industrial Computing
22
Appendix C
Terms and Conditions

Appendix C: Terms and Conditions

Warranty Policy

All products are under warranty against defects in 1. materials and workmanship for a period of one year from the date of purchase.
The buyer will bear the return freight charges for 2. goods returned for repair within the warranty period; whereas the manufacturer will bear the after service freight charges for goods returned to the user.
The buyer will pay for repair (for replaced components
3. plus service time) and transportation charges (both ways) for items after the expiration of the warranty period.
If the RMA Service Request Form does not meet the 4. stated requirement as listed on “RMA Service,” RMA goods will be returned at customer’s expense.
The following conditions are excluded from this 5. warranty:

RMA Service

Requesting a RMA#
To obtain a RMA number, simply fill out and fax the 6. “RMA Request Form” to your supplier.
The customer is required to fill out the problem code 7. as listed. If your problem is not among the codes listed, please write the symptom description in the remarks box.
Ship the defective unit(s) on freight prepaid terms. 8. Use the original packing materials when possible.
Mark the RMA# clearly on the box. 9.
Note: Customer is responsible for shipping
damage(s) resulting from inadequate/loose packing of the defective unit(s). All RMA# are valid for 30 days only; RMA goods received after the effective RMA# period will be rejected.
Improper or inadequate maintenance by the customer Unauthorized modification, misuse, or reversed engineering of the product Operation outside of the environmental specifications for the product.
Embedded and Industrial Computing
23
Appendix C
RMA Service Request Form
When requesting RMA service, please fill out the following form. Without this form enclosed, your RMA cannot be processed.
RMA No:
Reasons to Return: Ŀ Repair(Please include failure details) Ŀ Testing Purpose
Company: Contact Person:
Phone No. Purchased Date:
Fax No.: Applied Date:
Return Shipping Address: Shipping by: Ŀ Air Freight Ŀ Sea Ŀ Express ___ Ŀ Others:________________
Item Model Name Serial Number Configuration
Item Problem Code Failure Status
*Problem Code: 01:D.O.A. 02: Second Time R.M.A. 03: CMOS Data Lost 04: FDC Fail 05: HDC Fail 06: Bad Slot
07: BIOS Problem 08: Keyboard Controller Fail 09: Cache RMA Problem 10: Memory Socket Bad 11: Hang Up Software 12: Out Look Damage
13: SCSI 14: LPT Port 15: PS2 16: LAN 17: COM Port 18: Watchdog Timer
19: DIO 20: Buzzer 21: Shut Down 22: Panel Fail 23: CRT Fail 24: Others (Pls specify)
Request Party
Confirmed By Supplier
Authorized Signature / Date Authorized Signature / Date
Terms and Conditions
Embedded and Industrial Computing
24
Loading...