Hardware Platforms for Embedded and Industrial Computing
LEC-7105
Version 1.0
>>
User's Manual
Publication date:2012-01-03
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.
ResourceWebsite
Lannerhttp://www.lannerinc.com
Product Resources http://assist.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.
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 Certication
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 Certication
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.
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.
Thank you for choosing the LEC-7105. The LEC-7105 is
Lanner’s flagship IPC. It features the Dual Core Intel®
Atom™ D525 processor that has 1.8GHz of processing
power.
The LEC-7105 is an ideal solution for digital signage and
public infortainment. All electronics are protected in a
compact sealed aluminum case as a stand-alone unit and
can be easily situated in a place where space is limited and
the weather condition is diverse.
A solid sealed Aluminum extrusion framing provides
vibration and dust resistance while providing a passive
cooling solution. It also provides great protection from
EMI and shock.
Here is the list of the key features:
Intel integrated Graphics Media Accelerator 3150 •
which supports VGA (up to 2048x1536) and DVI-D
(1920 x1080)
Dual 10/100/1000 Mbps LAN (support WOL (Wake-on-•
LAN) and Remote-wake-up)
Two •Mini-PCIe expansion slots (One Mini-PCIe comes
with a SIM card reader that can support 3G Internet
and the other Mini-PCIe can support Wi-Fi or Bluetooth
connection)
One power eSATA (5V external SATA) which also •
supports USB connectivity. The Power eSATA solution
incorporates the eSATA connector with power source
together, allowing you to use external SATA devices
without the need of additional power source. It
provides storage for photos, videos and other multimedia contents.
USB x 4, COM x 2 (COM1 is RS-232 and COM2 is RS-•
232/422/485 selectable, and Digital Input/Output
(through 2 x 5-pin terminal block)
Audio output for L/R channels with RCA connectors ( •
Realtek ALC888S codec)
System Specification
LEC 7 Series
Dimension (WxHxD)
Processor
Chipset
System
Memory
Storage
Ethernet Controller
Graphic Controller
Audio Controller
IO
Power Input
AC Adapter
Hardware Monitor
OS Support
Certications
Compliance
Operating Temperature Range
with
Commercial Components
TechnologyDDR3 SODIMM x1
Max. CapacityUp to 4GB
IDE CF socket Type I/II x1
SATA2.5” HDD/SSD drive bay x1
LANGbE RJ45 x2
Display
Video GrabberNo
Audio
Serial I/O
GPSNo
Digital I/O
USB 2.0Type A x4; Internal x2
Power InputDC jack with lock
Expansion
Others
LEC-7105
268x44x174mm
(10.55”x1.73”x6.85”)
Intel Atom D525 1.8GHz
Intel ICH8M
Realtek RTL8111 x2
Intel GMA3150
Realtek ALC888S
DB15 x1 for VGA, DVI-D
( up to1920x1080)
RCA x2 for right/left Line-out
channels, Internal pin header for
Line-out, Line-in and Mic-in
DB9 x2 for RS232 x1;
RS232/422/485 x1
2 x 5-pin terminal block for DI x4
and DO x4 (5V TTL)
Mini-PCIe x2 (one with SIM card
reader)
External: Power-on button,
Power-on switch, 3x SMA
antenna hole, reset.
Internal: PS/2 keyboard and
mouse, +5Vdc output
+12Vdc +/- 5%, ATX mode
60W +12V @ 5A
Winbond W83627UHG integrated watchdog timer 1~255
level
Linux , XPE/WES2009, XP PRO
FES, WS7E, WS7P, WIN 7 PRO-E
CE, FCC Class A
No
-5~45°C/23~113°F
Embedded and Industrial Computing
4
Chapter 1
Package Contents
Your package contains the following items:
LEC-7105 Embedded System•
DC+12V 60W Power Adapter (080W240318306, US •
type)
Serial-ATA/Power Cable (P/N: 080W1N2201001)•
Wall-Mounting Kit (P/N: SE•9ESA900R100)
Drivers and User’s Manual CD•
Introduction
Embedded and Industrial Computing
5
Chapter 2
Chapter 2:
System Components
System Drawing
Mechanical dimensions of the LEC-7105
Unit: mm
System Components
Embedded and Industrial Computing
6
Chapter 2
Intel
ICH8M
Processor
ATOM D525
Winbond
W83627UHG
H/W Monitor
WDT
Digital IO
Terminal Block
PS/2 KB/MS
Pin Header
SATA
VGA
GbE LAN
2x RTL8111
2x PCIe
IDE
DDR3
SO-DIMM
Mini PCI Express
Socket
PCIe
USB
SIM Card Reader
Serial Port
RS232
RS232/422/485
2x DB-9
2x RJ-45
SATA-II
2x Connector
Compact Flash
Socket
LPC
BIOS Flash
SPI
VGA
DMI
USB
USB 2.0 Ports
4x Type A
1x Pin Header
LVDS to DVI
Encoder
CH7036
LVDS
DVI
PCIe to SATA
Controller
JMB362
PCIe
USB
Power
eSATA
Mini PCI Express
Socket (Support mSATA)
PCIe
SATA
HD Audio
Reaktek ALC888S
HD
MIC/Line In
Aduio/Line Out
Block Diagram
The block diagram depicts the relationships among the
interfaces and modules on the motherboard..
System Components
Embedded and Industrial Computing
7
Chapter 2
Front Components
System Components
F1
ComponentDescriptionPin Definition Reference
F1 HDD (Yellow) and
Power LED (Green)
F2 Antenna HoleReserved for antenna
F3 Line_Out_R
Line_Out_L
F4 Serial Ports 1 and 2Serial ports through the DB-9
F5 Power eSATAAn external SATA connector with
F6 Dual USB Stack ConnectorAn USB type A connector; in addition to
F7 Power-on SwitchA power-on switch through the
F8 Power Button with dual LEDATX Power-on button with LEDs:
F2
HDD
Power
RCA Jack for audio output left and
right
connector; COM1 supports RS-232
and COM2 supports RS-232/422/485
with switch selection among RS232/422/485.
5V power supply and support hot
plugging. It also supports USB 2.0
connection.
this connector, an internal pin header is
provided.
Phoenix contact for distant power-on/
off control
Standby mode in Red; Power-on mode
in Green
F3
Blinking: data access activities•
Off: no data access activities•
On: The computer is on.•
Off: The computer is off .•
F4
F5
F6
CN1, CN2 on page 17
COM1, COM2 on page 14
EUSB1 on page 14
Dual USB Port Connectors
(USB1, USB2) on Page16
J12 on page 16
F7
F8
Embedded and Industrial Computing
8
Chapter 2
Rear Components
R1 Antenna HoleReserved for antenna
R2 VGA PortDB-15 Female Connector for VGA
System Components
R1R2R3R4R5R6R7
ComponentDescriptionPin Definition Reference
VGA1 on page 17
connection (up to 2048x1536)
R3 DVI-DDVI-D port (single link) is provided
by Intel GMA 3150 through the
Chrontel’s CH7036 LVDS to DVI
converter.
R4 DIO Port4 digital input and 4 output ports
to support input and output
operations.
R5 Dual USB Stack Connector An USB type A connector; in
addition to this connector, an
internal pin header is provided.
R6 Dual 10/100/1000 LAN
Ports
LINK/ACT
R7 DC JackDC-in 12V power socket with
SPEED
Two RJ-45 (network) jacks with LED
indicators as described below. The
LAN ports are provided by Realtek
RTL8111. They both support WOL
(Wake-on-LAN) and Remote-wakeup.
LINK/ACT (Yellow)
On/Flashing: The port is linking •
and active in data transmission.
Off: The port is not linking.•
SPEED (Green/Amber)
Amber: The connection speed is •
1000Mbps.
Green: The connection speed is •
100Mbps
Off: .The connection speed is •
10Mbps.
Lock. Only use the power adapter
supplied with the LEC-7105 System.
DVI1 Connector on page 17
DIO1 on page 15
Dual USB Port Connectors (USB1,
USB2) on Page 16
LAN Ports (LAN1/LAN2) on page
15
Embedded and Industrial Computing
9
Chapter 3
Chapter 3:
Board Layout
External Connectors
The following picture highlights the location of system
input/output connectors. Refer to the table 3.1 Connector
List for more details.
Board Layout
CN7
LAN1/LAN2
USB1
DIO1
RST1
DVI1
VGA1
Embedded and Industrial Computing
CN2/CN1
COM2/COM1
EUSB1
USB2
J12
BUT1
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.
Board Layout
J27
J7
J25
J3
SATA2
SATA1
J13
J1
J6
CN8
KBM1
CFD1
LPC1
Embedded and Industrial Computing
JP3
JP2
SCT1
SCT2
J2
JP1
J10
J11
LEB-7105
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-7105
LabelsFunctionPin Denition Reference
Page
CFD1CompactFlashP15
CN1 & CN2Lineout Left/RightP17
COM1RS-232 PortP14
COM2RS-232/422/485 PortP14
DIO1Digital Input/OutputP15
DVI1DVI-D ConnectorP17
EUSB1Power eSATA PortP14
J1SPI ROM HeaderReserved for Factory
J10USB Pin HeaderP16
J11Miscellaneous Front Panel PinsP16
J12External Power SwitchP16
J13SYSTEM Thermal SensorP17
J2Line In/Out and MIC Pin HeaderP17
J25Mini-PCIe Power Voltage SelectionP17
J27Power for Passive Antenna P18
J3SATA PowerP14
J6ICH8M Chipset SMB SignalsReserved for Factory
J7LAN and WLAN LED (Only on MPCIE1)P17
JP1 & JP2Select COM1/COM2 Pin9 Function Jumper SettingsP14
JP3Clean CMOSP15
KBM1PS/2 Keyboard and MouseP17
LAN1/LAN2 PortsLAN1, LAN2 portsP15
LPC1Low Pin Count Bus for Debug PurposeReserved for Factory
MPCIE1Mini-PCIe Slot (with SIM Card Reader)P16
MPCIE2 Mini-PCIe Slot P16
SATA1Serial-ATA Connector 1P14
SATA2 Serial-ATA Connector 2 P14
SCT1/SCT2Seclect COM2 Protocol Jumper settingsP14
USB1Dual USB Port P16
USB2Dual USB Port P16
VGADB-15 VGA PortP17
Embedded and Industrial Computing
12
Chapter 3
Board Layout
Jumper Settings
LEB-7105
Serial-ATA Connector (SATA1, SATA2): It is for connecting
a 2.5’’ harddisk to be served 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.Function
1 2 3 4 5 6 7
4-pin Serial-ATA Power Connector (J3): It is for
connecting the SATA power cord.
4 3 2 1
Power eSATA Port (5V, EUSB1): A Power external SATA
port supports hot plugging of SATA II disc. It was provided
by the PCIe to SATA controller: JMB362 which connects
to the ICH8M through the PCIe interface. It can support
USB2.0 as well as eSATA transmission.
JP1, JP2: Select COM1 and COM2 power : The Pin No.
9 of RS-232 can be altered to supply power. JP1 and JP2
are used to select the power voltage for COM1 and COM2
respectively.
RS-232 Pin 9 FunctionJP1, JP2
6
4
2
+5V1-2
+12V3-4
RI (Default)5-6
5
3
1
13
Chapter 3
25 1
50 26
Board Layout
CompactFlash Connector (CFD1): It is for connecting a
Compact Flash card to be served as your system’s storage.
To access some components and perform certain service
procedures, you must perform the following procedures
first.
WARNING: To reduce the risk of personal injury,
electric shock, or damage to the equipment,
remove the power cord to remove power from the
server. The front panel Power On/Standby button
does not completely shut off system power.
Portions of the power supply and some internal
circuitry remain active until AC power is removed.
Unpower the LEC-7105 and remove the power cord.1.
Unscrew the 3 threaded screws on both sides of the 2.
top cover of the LEC-7105 System.
Slide the cover backwards and open the cover 3.
Note:
The motherboards can support up to 4 GB 1.
memory capacity in maximum.
Installing the Hard Disk
The system can accomdate two Serial-ATA disks. Follow
these steps to install a hard disk into the LEC-7105:
Unsrew the 4 screws on the hard disk tray to take out 1.
the hard disk tray from the system.
Place hard disk on the hard disk tray and align the holes 2.
of the hard disk with the mounting holes on the tray.
Secure the hard disk with 4 mounting screws on the 3.
hard disk tray.
Connect the Serial-ATA power and datacables to the 4.
hard disk’s connectors respectively.
Plug the Serial-ATA cable to the Serial-ATA Connector 5.
on the main board.
Put the hard disk tray with the installed hard disk back 6.
to the system and secure it with the mounting screws.
upwards.
Installing the System Memory
The motherboard supports DDR3 memory. It comes with
one Double Data Rate (DDR3) Small Outline Dual Inline
Memory Modules (SO-DIMM) sockets.
Open the SO-DIMM slot latches.1.
Install the SO-DIMM.2.
1
2
Embedded and Industrial Computing
18
Chapter 4
Introduction
Installing a CompactFlash Card
LEC-7105 provides one CompactFlash slot. To install the
CF card, Follow these procedures bellow for installing a
CompactFlash card.
In order to insert the CF card, you will have to take off 1.
the front panel first. To take off the front panel, unscrew
the 2 screws on the front panel and the hex-shaped
screws of the COM ports.
Align CompactFlash card and the card slot with the 2.
arrow pointing toward the connector.
Push the card to insert into the connector.3.
1
3G SIM Card Installation
Open the SIM tray and flip it diagnolly.1.
Align the cut corner of the SIM card with the SIM card 2.
socket. Make sure the ICs is in contact with the reader.
Insert the 3. SIM card into the tray diagonally. Close and
lock the tray.
Wireless 3G module Installation
Align the wireless module’s cutout with the Mini-PCIe 1.
slot notch.
Insert the wireless module into the connector 2.
diagnoally.
Push the other end of the wireless module to be 3.
tightened with the latch.
3
3G module
1
3
2
2
2
SIM Card
Note:
To remove the module from the system, release 1.
the latch first by slightly bending it inward.
To remove the SIM card, unlock the tray first by 2.
sliding it outward.
lock
Embedded and Industrial Computing
Unlock
19
Chapter 4
Wall Mounting
The product ships with wall mounting kit. To mount your
product on the wall, follow the instructions below:
First make a hole for the anchor in the surface on the 1.
wall.
Then press the anchor into the hole until it is flush with 2.
the surface. You may need a hammer to tap the wall
anchor.
Use a screwdriver to screw the threaded screw into the 3.
plastic anchor.
Attach the wall mounting bracket to the back of the 4.
device, securing it in place with four of the flat-head
screws provided.
Hang the device on the wall.5.
Introduction
Unit: mm
Embedded and Industrial Computing
20
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
system (or one pair of network ports in bypassed state;
However, only one function can be activated at a time.)
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 wd_bp folder under Driver
and Utility on the Driver and Manual CD
Set the access mode with these two parameters 2.
by editing the Makefile.linux directly: DIRECT_IO_
ACCESS= [0|1] (enter either 1 or 0) and LANNER_
DRIVER= [0|1] (enter either 1 or 0). 1 is for direct access
and no driver is needed. You will only need to execute
the program directly. However, when it equaled to 0,
driver installation is needed. Refer to the following
Install section for more details.
Type make to build source code:3.
make Makefile (Note: omit the file extensions)
After compiled, the executable program (bpwd_tst) and
the driver (bpwd_drv.ko) will be in the bin subdirectory.
Install
The installation procedures depend on the access mode
that you have set by using the above mentioned method.
If you have set DIRECT_IO_ACCESS=1, driver installation is
not necessary. Proceed to the next section on executing
If you have set DIRECT_IO_ACCESS=0, Lanner bypass
driver needs to be installed. Install the driver and create
a node in the /dev directory as shown in the following
example:
Executing the commands through the Command Line:
1. wd_tst --swtsr (Set Watchdog Timeout State to Reset)
Copy the proper makefile from the Driver and Manual 1.
CD to your system
Embedded and Industrial Computing
Note:
wd_tst --start will not be available if 1.
21
Appendix A
Programming Watchdog Timer
DIRECT_IO_ACCESS=1, use the command: “./
wd_tst --swt xxx” to start the watchdog timer
instead .
Watchdog timer can support two functions, 2.
- system rest or LAN bypass. However, only
one function can be activated at a time. You
should modify the code or switch it to the
desired state/function accordingly.
For more details, refer to the README file 3.
contained within the program.
void set_bypass_enable_when_system_off(unsigned long
pair_no)
{
Embedded and Industrial Computing
return;
}
tmp=read_w83627_reg(ldn_no, reg_no);
tmp &= ~(bit_mask) ;
tmp |= en_data;
write_w83627_reg(ldn_no, reg_no, tmp);
return;
}
26
Appendix A
Programming Watchdog Timer
void set_bypass_disable_when_system_off(unsigned long
pair_no)
{
int reg_no, ldn_no;
unsigned char bit_mask;
unsigned char en_data;
unsigned char tmp;
reg_no=ldn_no=bit_mask=en_data=tmp=0;
switch(pair_no) {
case BYPASS_PAIR_1:
ldn_no = OFFMODE_BYPASS_
PAIR1_LDN;
reg_no = OFFMODE_BYPASS_
PAIR1_REG;
bit_mask = OFFMODE_BYPASS_
PAIR1_BIT;
en_data = OFFMODE_BYPASS_
PAIR1_DISABLE;
break;
case BYPASS_PAIR_2:
ldn_no = OFFMODE_BYPASS_
PAIR2_LDN;
reg_no = OFFMODE_BYPASS_
PAIR2_REG;
bit_mask = OFFMODE_BYPASS_
PAIR2_BIT;
en_data = OFFMODE_BYPASS_
PAIR2_DISABLE;
break;
default:
/*un-support pair no, return */
return;
}
tmp=read_w83627_reg(ldn_no, reg_no);
}
void set_runtime_bypass_enable(unsigned long pair_no)
{
int reg_no, ldn_no;
unsigned char tmp, bit_mask, en_data;
reg_no=ldn_no=bit_mask=en_data=tmp=0;
/* Note: To sete runtime bypass mode, user need to set offmode bypass
* enabled in order to let function activity.
*/
set_bypass_enable_when_system_off(pair_no);
switch(pair_no) {
case BYPASS_PAIR_1:
ldn_no = RUNTIME_BYPASS_
PAIR1_LDN;
reg_no = RUNTIME_BYPASS_
PAIR1_REG;
bit_mask = RUNTIME_BYPASS_PAIR1_BIT;
en_data = RUNTIME_BYPASS_PAIR1_ENABLE;
break;
case BYPASS_PAIR_2:
ldn_no = RUNTIME_BYPASS_
PAIR2_LDN;
reg_no = RUNTIME_BYPASS_
PAIR2_REG;
bit_mask = RUNTIME_BYPASS_PAIR2_BIT;
en_data = RUNTIME_BYPASS_PAIR2_ENABLE;
break;
default:
/*un-support pair no, return */
return;
tmp &= ~(bit_mask) ;
tmp |= en_data;
write_w83627_reg(ldn_no, reg_no, tmp);
return;
Embedded and Industrial Computing
}
tmp=read_w83627_reg(ldn_no, reg_no);
tmp &= ~(bit_mask) ;
tmp |= en_data;
write_w83627_reg(ldn_no, reg_no, tmp);
27
Appendix A
Programming Watchdog Timer
return;
}
void set_runtime_bypass_disable(unsigned long pair_no)
{
int reg_no, ldn_no;
unsigned char tmp, bit_mask, en_data;
reg_no=ldn_no=tmp=bit_mask=en_data=0;
switch(pair_no) {
case BYPASS_PAIR_1:
ldn_no = RUNTIME_BYPASS_PAIR1_LDN;
reg_no = RUNTIME_BYPASS_PAIR1_REG;
bit_mask = RUNTIME_BYPASS_PAIR1_BIT;
en_data = RUNTIME_BYPASS_PAIR1_
DISABLE;
break;
case BYPASS_PAIR_2:
/* set GPIO27=1 for reset mode */
tmp=read_w83627_reg(0x9, 0xe5);
tmp |= SIO_GPIO_27_BIT;
write_w83627_reg(0x9, 0xe5, tmp);
return;
}
void set_wdto_state_system_bypass(void)
{
unsigned char tmp;
/* set GPIO27=0 for bypass mode */
tmp=read_w83627_reg(0x9, 0xe5);
tmp &= ~SIO_GPIO_27_BIT;
write_w83627_reg(0x9, 0xe5, tmp);
return;
}
ldn_no = RUNTIME_BYPASS_PAIR2_LDN;
reg_no = RUNTIME_BYPASS_PAIR2_REG;
bit_mask = RUNTIME_BYPASS_PAIR2_BIT;
en_data = RUNTIME_BYPASS_PAIR2_
DISABLE;
break;
}
tmp=read_w83627_reg(ldn_no, reg_no);
tmp &= ~(bit_mask) ;
tmp |= en_data;
write_w83627_reg(ldn_no, reg_no, tmp);
return;
}
void set_wdto_state_system_reset(void)
{
#endif
int main (int argc, char* argv[])
{
try
{
int num = sizeof (id2fun) / sizeof (id2fun[0])
; //Total function number
//No parameter. Print the help message
if (argc < 2)
RETMSG (-1, PARAMETER_HELP) ;
//Find and call the coresponding function
for (int i = 0 ; i < num ; i++)
if (stricmp (argv[1], id2fun[i].szID)
== 0)
unsigned char tmp;
Embedded and Industrial Computing
return id2fun[i].function
28
Appendix A
(argc, argv) ;
RETMSG (-1, “Unknown function name\n”)
;
}
catch (char *str)
{
printf (“\n%s\n”, str) ;
}
catch (...)
{
printf (“\nUnknown Exception\n”) ;
}
return -1 ;
Programming Watchdog Timer
}
Embedded and Industrial Computing
29
Appendix B
Digital Input/Output Control
Appendix B:
Digital Input/Output
Control on the GPIO port
The Digital I/O port (DIO) is designed to provide the input
and output operations for the system. For sample DIO
code, see DIO folder under Driver and Utility on the Driver and Manual CD.
Executing the commands through the Command Line:
# dio_tst
The program will drive output pin with specific value and
read status of input pin. If you have external loopback
which connects input to output pins directly, the input
value should be identical with the output value.
Note:
For DOS environment, use DJGPP as compiler 1.
and the makefile: Makefile.dos.
For Linux, support kernel versions are 2.4.x and 2.
2.6.x. Use the makefile:Makefile.linux.
For FreeBSD, support version is FreeBSD 8.0. 3.
use the makefile: Makefile.
Build
To build program source code on Linux platform, use the
following steps as a guideline:
Copy the proper makefile from the Driver and Manual 1.
CD to your system
Set the access mode with these two parameters 2.
by editing the Makefile.linux directly: DIRECT_IO_
ACCESS= [0|1] (enter either 1 or 0) and LANNER_
DRIVER= [0|1] (enter either 1 or 0). 1 is for direct access
and no driver is needed. You will only need to execute
the program directly. However, when it equaled to 0,
driver installation is needed. Refer to the following
Install section for more details.
Type make to build source code:3.
make Makefile (Note: omit the file extensions)
After compiled, the executable program (bpwd_tst) and
the driver (bpwd_drv.ko) will be in the bin subdirecto
Install
The installation procedures depend on the access mode
that you have set by using the above mentioned method.
If you have set DIRECT_IO_ACCESS=1, driver installation is
not necessary. Proceed to the next section on executing
If you have set DIRECT_IO_ACCESS=0, Lanner bypass
driver needs to be installed. Install the driver and create
a node in the /dev directory as shown in the following
example:
For Linux:
Insert module and create node in /dev as below
example:
#insmod dio_drv.[k]o
#mknod /dev/dio_drv c 240 0
For FreeBSD:
Insert module as below example:
#kldload -v ./dio_drv.ko
I/O Address
DIO Address LDN8
AddressDescription
0x2eSUPERIO_INDEX
0x2fSUPERIO_DATA
0x07BANK_REG
0xE6 (Bit 3)GPO63
0: Low 1: High
0xE6 (Bit 2)GPO62
0: Low 1: High
0xE6 (Bit 1)GPO61
0: Low 1: High
0xE6 (Bit 0)GPO60
0: Low 1: High
DIO Address LDN9
AddressDescription
0x2eSUPERIO_INDEX
0x2fSUPERIO_DATA
0x07BANK_REG
0xE6 (Bit 3)GPI24
0: Low 1: High
0xE6 (Bit 2)GPI25
0: Low 1: High
0xE6 (Bit 1)GPI26
0: Low 1: High
0xE6 (Bit 0)GPI27
0: Low 1:High
Embedded and Industrial Computing
30
Appendix B
For example
Setting GPO 60-63 all low.1.
outportb(0x2e, 0x07); LDN8
outportb(0x2f, 0x08);
outportb(0x2e, 0x30); Setting GPIO6.
outportb(0x2f, 0x04);
outportb(0x2e, 0xE4); GP0 60-63
outportb(0x2f, 0x?0); ?:GP0 64-67 Unuse.
outportb(0x2e, 0xE6); GP0 60-63 Uninvert
outportb(0x2f, 0x?0); ?:GP0 64-67 Unuse.
Digital Input/Output Control
Execute
Once build completed, application (and driver) is available
in bin sub-directory.
Just run “dio_tst” for Digital IO test. This program will drive
output pin with specific value and read status of input
pin. If you have external loopback which connects input
to output pins directly, the input value should be identical
with output value.
screen capture of the execution result:
outportb(0x2e, 0xE5); GP0 60-63 1:high
outportb(0x2f, 0x?0); 0:low
Setting GPI 24-27. 2.
outportb(0x2e, 0x07); LDN9
outportb(0x2f, 0x09);
outportb(0x2e, 0x30); Setting GPIO6.
outportb(0x2f, 0x04);
outportb(0x2e, 0xE4); GPI 24-27
outportb(0x2f, 0x?F); ?:GPI 20-23 Unuse.
outportb(0x2e, 0xE6); GPI 24-27 Uninvert
outportb(0x2f, 0x?0); ?:GPI 20-23 Unuse.
Note: For more details, refer to the README file
contained within the program
void write_w83627_reg(int LDN, int reg, int value)
{
enter_w83627_config();
outportb(INDEX_PORT, 0x07); // LDN Register
outportb(DATA_PORT, LDN); // Select LDNx
outportb(INDEX_PORT, reg); // Select Register
outportb(DATA_PORT, value); // Write Register
/* set GPIO60~63 generate high signal */
tmp=read_w83627_reg(0x08, 0xE5);
tmp |= GPIO_GPIO60_GPIO63_MASK;
write_w83627_reg(0x08, 0xE5, tmp);
/* Enable GPIO 2x function */
tmp=read_w83627_reg(0x09, 0x30);
tmp |= GPIO2X;
write_w83627_reg(0x09, 0x30, tmp);
/* set GPIO24~27 as Input function */
tmp=read_w83627_reg(0x09, 0xE4);
tmp |= GPIO_GPIO24_GPIO27_MASK;
write_w83627_reg(0x09, 0xE4, tmp);
/* set GPIO24~27 as uninvert */
exit_w83627_config();
return;
}
void dio_gpio_init(void)
{
unsigned char tmp;
/* Enable GPIO 6x function */
tmp=read_w83627_reg(0x08, 0x30);
tmp |= GPIO6X;
write_w83627_reg(0x08, 0x30, tmp);
/* set GPIO60~63 as Output function */
tmp=read_w83627_reg(0x08, 0xE4);
tmp &= ~(GPIO_GPIO60_GPIO63_MASK);
write_w83627_reg(0x08, 0xE4, tmp);
tmp=read_w83627_reg(0x09, 0xE6);
tmp &= ~(GPIO_GPIO24_GPIO27_MASK);
write_w83627_reg(0x09, 0xE6, tmp);
return;
}
void dio_set_output(unsigned char out_value)
{
unsigned char tmp;
tmp = read_w83627_reg(0x08,0xE5);
tmp &= ~GPIO_GPIO60_GPIO63_MASK;
tmp |= out_value;
write_w83627_reg(0x08, 0xE5, tmp);
delay(333);
return;
}
/* set GPIO60~63 as uninvert */
tmp=read_w83627_reg(0x08, 0xE6);
tmp &= ~(GPIO_GPIO60_GPIO63_MASK);
Embedded and Industrial Computing
unsigned char dio_get_input(void)
{
34
Appendix B
unsigned char tmp;
tmp=read_w83627_reg(0x09, 0xE5);
tmp &= GPIO_GPIO24_GPIO27_MASK;
return tmp;
}
#endif
Digital Input/Output Control
Embedded and Industrial Computing
35
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
36
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