ibttech_IB70510
ibttech_IB70510
VIA CN400
5.25-inch SBC
USER’S MANUAL
Version 1.0
Acknowledgments
Appendix 53
A. I/O Port Address Map .................................................53
B. Interrupt Request Lines (IRQ).....................................54
C. Watchdog Timer Configuration...................................55
D. Digital I/O Sample Code.............................................58
Introduction
Product Description
The IB705 SBC features CN400 advanced digital media chipset and
highly efficient VIA processors on board with up to 1.4GHz processor
speed.
Designed for the digital entertainment, automotive and mobile markets,
the board integrates the S3 Graphics UniChrome Pro IGP graphics core
that features Chromotion CE Video Display engine with hardware
MPEG-2 and MPEG-4 acceleration. With the FastStream memory
controller and 1GB/s high-speed interface to VIA's feature-leading
South Bridge options, it comes with two DDR400 memory sockets
supporting a robust shared memory architecture and up to 2GB memory
size.
Furthermore, IB705 supports an impressive range of high-speed storage
and networking connectivity options such as two Serial ATA ports, six
USB 2.0 ports, onboard 10/100Mbps Ethernet controller and Realtek
8110S Gigabit Ethernet. Other advanced features of this 5.25-inch
disk-size SBC are four serial ports, watchdog timer, digital I/O, PCI and
PCI+ interface.
Features of IB705
§ Onboard VIA Eden / C3 processors
§ Up to 1.4GHz, 133/200MHz FSB
§ DDR DIMM x 2, max. 2GB
§ Onboard 10/100 and Realtek 8110S Gigabit Ethernet
§ Integrated VIA CN400 CRT VGA, 24-bit LVDS
§ 2 x SATA, 6 x USB 2.0, 4 x COM, Digital I/O
§ Watchdog timer, CF socket, PCI slot, PC104+ interface
Checklist
Your IB705 package should include the items listed below.
• The IB705 Embedded Board
• This User’s Manual
• 1 CD containing chipset drivers and flash memory utility
• Optional cables such as:
• 1 FDD Ribbon Cable
• 1 Audio Cable
• 2 IDE Ribbon Cables (40-pin & 44-pin)
• 1 COM Port Cable
• 1 Printer Port Cable
• 1 PS/2 Keyboard/Mouse Cable
• 1 VGA Cable
• ID240 Ethernet cable kit
• Single USB Port Cable Bracket
Specifications
Product Name IB705
Form Factor 5.25” Little Board (SBC)
CPU Type VIA EDEN EBGA / C3 EBGA
CPU Voltage 1.05V ~ 1.20V
CPU FSB 100/133/200MHz
CPU Frequency 300MHz ~ 1.4GHz
Green / APM APM1.2
Chipset North bridge: CN400 681-pin HSBGA
South bridge: VT8237 539-pin PBGA
BIOS Award BIOS supports ACPI function
Cache 128K/64K (CPU integrated)
Memory 184-pin DDR200/266/333/400 DIMM socket x2, supports
up to 2GB max.
VGA VIA CN400 built-in 128-bit Unichrome Pro 3D/2D controller
Supports 16/32/64 MB frame buffer size
LCD (LVDS) VIA VT1631 Support 24bit Dual Channel LVDS
MPEG-2 & MPEG-4 CN400 built-in, Slice Layer, IDCT & Motion Compensation
Hardware MPEG-4 acceleration
LAN 1.VIA VT8237 built-in 10/100 LAN MAC + VT6103 PHY
2.RTL8110S-32 Gigabit LAN controller
USB VIA VT8237 built-in USB Version 2.0, supports 6 ports
Serial ATA VIA VT8237 built-in SATA controller, supports 2 ports &
RAID 0, 1
IDE VIA VT8237 built-in Two Channels Ultra DMA
33/66/100/133
Audio VIA VT8237 built-in Audio controller + AC97 Codec ALC
655 5.1 Channel (Line-out, Line-in & Mic.)
LPC I/O Winbond W83697HF: Parallel port x1, COM1 (RS-232),
COM2 (RS232/422/485), FDC 1.44MB, Hardware Monitor
(3 thermal inputs, 6 voltage monitor inputs & 3 fan headers)
Secondary I/O Fintek F81216D for COM3, 4 (RS-232)
RTC/CMOS VIA VT8237 built-in RTC with on board Lithium Battery
KB/Mouse VIA VT8237 built-in PS/2 Keyboard/Mouse Controller
Expansion Slots PCI slot x 1 (supports 2 bus masters)
PC104+ Connector x1 (PCI only)
Compact Flash Type II on IDE2
On Board Connector / Serial ATA connector x 2
Header 40 pins box-header x 1 (IDE1)
44 pins box-header x 1 (IDE2)
34 pins box-header x 1 for Floppy
26 pins box-header x 1 for Printer
16 pins pin-header x 1 for VGA/CRT
5x2 pins pin-header x 1 for LAN1
8x2 pins pin-header x 1 for LAN2
10x2 pins pin-header x 2 for COM1~4
6x2 pins pin-header x 1 for audio
5x2 pins pin-header x 1 for KB/Mouse
4x2 pins pin-header x 3 for USB0~5
4x2 pins pin-header for power switch, reset, power LED
etc.
Digital I/O 4 In and 4 Out (TTL level)
Power Connector 4-pin AT power connector
Watchdog Timer Yes (256 segments: 0, 1, 2,..., 255 sec/min)
Board Size 203mm x 146mm
Board Dimensions
Installations
This section provides information on how to use the jumpers and
connectors on the IB705 in order to set up a workable system. The topics
covered are:
Installing the Memory (DIMM) .........................................6
Setting the Jumpers ...........................................................7
Connectors on IB705.......................................................11
Lock Lock
Open Slave
Close Master
Connectors on IB705
The connectors on IB705 allows you to connect external devices such as
keyboard, floppy disk drives, hard disk drives, printers, etc. The
following table lists the connectors on IB705 and their respective
functions.
Connector Locations on IB705.........................................................12
CN1, CN2: Serial ATA Connector...................................................13
CN3: Compact Flash Card Type II Connector ................................13
Fan1, Fan3: System and CPU Fan Power Connector......................13
Fan2: ATX Power Connector ...........................................................13
FDD1: Floppy Drive Connector .......................................................13
IDE1, IDE2: EIDE Connectors.........................................................14
P1: AT Power Supply Connector .....................................................15
J1: LCD Inverter Output....................................................................15
J2: Digital I/O Connector (4 in, 4 out) .............................................15
J4: Parallel Port Connector................................................................15
J5: IrDA Connector ...........................................................................16
J6: PC104+ Connector.......................................................................16
J8, J7: 1st and 2nd Channel LVDS Connector (DF13-20)..............17
J9: External Audio Connector...........................................................18
J10: CD-in Connector........................................................................18
J11: PS/2 Keyboard and Mouse Connector .....................................18
J12: External Keyboard Connector...................................................18
J13: VGA CRT Connector................................................................19
J14: Gigabit LAN Connector (used with ID240) ............................19
J15: 10/100 LAN Connector (used with ID240) .............................19
J16, J19, J20: USB Connectors.........................................................19
J17: Speaker .......................................................................................20
J18: External –5V, -12V Input Connector .......................................20
J21: System Function Connector......................................................20
J23: COM1 / COM2 Serial Ports......................................................21
J22: COM3 / COM4 Serial Ports......................................................22
* The KEY pins are to guarantee proper module installation. Pin-A1 will
be removed and the female side plugged for 5.0V I/O signals and
Pin-D30 will be modified in the same manner for 3.3V I/O. It is
recommended that both KEY pins (A1 and D30) be electrically
connnected for GND for shielding.
PANEL ID TABLE
Panel ID Resolution Channel Dithering
0 640x480 1 Enable
1 800x600 1 Enable
2 1024x768 1 Enable
3 1280x768 1 Enable
4 1280x1024 2 Enable
5 1400x1050 2 Enable
6 1600x1200 2 Enable
7 1280x800 1 Enable
8 800x480 1 Enable
9 1024x768 2 Enable
A 1024x768 1 Disable
B 1024x768 2 Disable
C 1280x768 1 Disable
D 1280x1024 2 Disable
E 1400x1050 2 Disable
F 1600x1200 2 Disable
J17: Speaker
Pin # Signal Name
1 Speaker out
2 NC
3 Ground
4 Vcc
BIOS Setup
This chapter describes the different settings available in the
Award BIOS that comes with the motherboard. The topics
covered in this chapter are as follows:
BIOS Introduction........................................................................................................ 24
BIOS Setup ................................................................................................................... 24
Standard CMOS Setup ................................................................................................. 26
Advanced BIOS Features............................................................................................. 29
Advanced Chipset Features ......................................................................................... 32
Integrated Peripherals .................................................................................................. 36
Power Management Setup ........................................................................................... 38
PNP/PCI Configurations .............................................................................................. 41
PC Health Status........................................................................................................... 42
Frequency/Voltage Control ......................................................................................... 43
Load Fail-Safe Defaults ............................................................................................... 44
Load Optimized Defaults............................................................................................. 44
Set Supervisor/User Password..................................................................................... 44
Save & Exit Setup ........................................................................................................ 44
Exit Without Saving ..................................................................................................... 44
BIOS Introduction
The Award BIOS (Basic Input/Output System) installed in your
computer system’s ROM supports VIA processors. The BIOS provides
critical low-level support for a standard device such as disk drives, serial
ports and parallel ports. It also adds virus and password protection as
well as special support for detailed fine-tuning of the chipset controlling
the entire system.
BIOS Setup
The Award BIOS provides a Setup utility program for specifying the
system configurations and settings. The BIOS ROM of the system stores
the Setup utility. When you turn on the computer, the Award BIOS is
immediately activated. Pressing the <Del> key immediately allows you
to enter the Setup utility. If you are a little bit late pressing the <Del>
key, POST (Power On Self Test) will continue with its test routines, thus
preventing you from invoking the Setup. If you still wish to enter Setup,
restart the system by pressing the ”Reset” button or simultaneously
pressing the <Ctrl>, <Alt> and <Delete> keys. You can also restart by
turning the system Off and back On again. The following message will
appear on the screen:
When you enter the Setup utility, the Main Menu screen will
appear on the screen. The Main Menu allows you to select
from various setup functions and exit choices.
Drive A None
Video EGA/VGA
Halt On All, but keyboard
At the bottom of the menu are the control keys for use on this menu. If
you need any help in each item field, you can press the <F1> key. It will
display the relevant information to help you. The memory display at the
lower right-hand side of the menu is read-only. It will adjust
automatically according to the memory changed. The following
describes each item of this menu.
Date
The date format is:
Day : Sun to Sat
Month : 1 to 12
Date : 1 to 31
Year : 1999 to 2099
To set the date, highlight the “Date” field and use the PageUp/
PageDown or +/- keys to set the current time.
Time
The time format is: Hour : 00 to 23
Minute : 00 to 59
Second : 00 to 59
To set the time, highlight the “Time” field and use the <PgUp>/ <PgDn>
or +/- keys to set the current time.
Press <Enter> to configure the hard disk. The selections include Auto,
Manual, and None. Select ‘Manual’ to define the drive information
manually. You will be asked to enter the following items.
CYLS : Number of cylinders
HEAD : Number of read/write heads
PRECOMP : Write precompensation
LANDZ : Landing zone
SECTOR : Number of sectors
Drive A
These fields identify the types of floppy disk drive that has been installed
in the computer. The available specifications are:
360KB 1.2MB 720KB 1.44MB 2.88MB
5.25 in. 5.25 in. 3.5 in. 3.5 in. 3.5 in.
Video
This field selects the type of video display card installed in your system.
You can choose the following video display cards:
EGA/VGA For EGA, VGA, SEGA, SVGA
or PGA monitor adapters. (default)
CGA 40 Power up in 40 column mode.
CGA 80 Power up in 80 column mode.
MONO For Hercules or MDA adapters.
Halt On
This field determines whether or not the system will halt if an error is
detected during power up.
No errors The system boot will not be halted for any error
that may be detected.
All errors Whenever the BIOS detects a non-fatal error,
the system will stop and you will be prompted.
All, But Keyboard The system boot will not be halted for a
keyboard error; it will stop for all other errors
All, But Diskette The system boot will not be halted for a disk
error; it will stop for all other errors.
All, But Disk/Key The system boot will not be halted for a key-
board or disk error; it will stop for all others.
Security Option
This field allows you to limit access to the System and Setup. The default
value is Setup. When you select System, the system prompts for the User
Password every time you boot up. When you select Setup, the system
always boots up and prompts for the Supervisor Password only when the
Setup utility is called up.
Memory Hole
In order to improve performance, certain space in memory can be
reserved for ISA cards. By default, this field is disabled.
Integrated Peripherals
This section sets configurations for your hard disk and other integrated
peripherals.
Phoenix - Award WorkstationBIOS CMOS Setup Utility
Integrated Peripherals
SuperIO Device
Upon pressing Enter on this field, another window appears. Below are
the fields shown with their respective default settings:
Onboard FDC Controller – Disabled
Onboard Serial Port 1 – 3F8/IRQ4
Onboard Serial Port 2 – 2F8/IRQ3
UART Mode Select – Normal
Onboard Parallel port – 378/IRQ7
Parallel Port Mode – SPP
REMARKS: Please note that the onboard FDC controller and serial
port 4, by default, are both DISABLED.
ACPI Function
Enable this function to support ACPI (Advance Configuration and
Power Interface).
Suspend Mode
BIOS will turn the HDD's motor off when system is in SUSPEND mode.
By default, this field is disabled.
Soft-Off by PWRBTN
This field defines the power-off mode when using an ATX power
supply. The Instant Off mode allows powering off immediately upon
pressing the power button. In the Delay 4 Sec mode, the system powers
off when the power button is pressed for more than four seconds or
enters the suspend mode when pressed for less than 4 seconds.
PNP/PCI Configurations
This option configures the PCI bus system. All PCI bus systems on the
system use INT#, thus all installed PCI cards must be set to this value.
Phoenix - Award WorkstationBIOS CMOS Setup Utility
PnP/PCI Configurations
PnP OS Installed No ITEM HELP
Reset Configuration Data Disabled Menu Level
Resources Controlled By Auto (ESCD)
IRQ Resources Press Enter Default is Disabled.
Select Enabled to reset
Extended System
PCI/VGA Palette Snoop Disabled Configuration Data
Assign IRQ for VGA Enabled (ESCD) when you exit
Assign IRQ for USB Enabled Setup if you have
installed a new add-on
and the system
reconfiguration has
caused such a serious
conflict that the OS
cannot boot
PNP OS Installed
Enable the PNP OS Install option if it is supported by the operating
system installed. The default value is No.
Resources Controlled by
This PnP BIOS can configure all of the boot and compatible devices
automatically with the use of a use a PnP operating system such as
Windows 95.
PC Health Status
Phoenix - Award WorkstationBIOS CMOS Setup Utility
PC Health Status
ITEM HELP
Thermal Duty Cycle Disabled
CPU Warning Temperature Disabled
Current System Temp. 39°C/102°F
Current CPU Temp. 32°C/89°F
Current CPU FAN Speed 0 RPM
Current Chassis FAN Speed 0 RPM
Vcore (V) 1.63V
Vcc3(V) 3.37V
+5V 5.05V
+12V 12.09V
-12V -12.03V
-5V - 4.79V
VBAT(V) 3.21V
5VSB(V) 5.05V
Shutdown Temperature Disabled
CPU Fan Failure Warning Disabled
Cha Fan Failure Warning Disabled
Temperatures/Fan Speeds/Voltages
These fields are the parameters of the hardware monitoring function
feature of the motherboard. The values are read-only values as
monitored by the system and show the PC health status.
Shutdown Temperature
This field allows the user to set the temperature by which the system
automatically shuts down once the threshold temperature is reached.
This function can help prevent damage to the system that is caused by
overheating.
Fan Failure Warning
The fan failure warning feature applies to the CPU and
chassis. When enabled, it can give a warning to protect the
CPU and system from damage due to overheating.
Frequency/Voltage Control
This section shows the user how to configure the processor frequency.
Phoenix - Award WorkstationBIOS CMOS Setup Utility
Frequency/Voltage Control
VIA C3 Clock Ratio Default ITEM HELP
Auto Detect PCI/DIMM Clk Disabled Menu Level
Spread Spectrum Disabled
Spread Spectrum
This field sets the value of the spread spectrum. The default setting is
Disabled. This field is for CE testing use only.
Drivers Installation
IMPORTANT NOTE:
Please also install Serial ATA and RAID drivers with the included
floppy disks.
1. Insert the CD that comes with the motherboard and the screen below
would appear. Click VIA CN400 Chipset Drivers.
9. On the next window, click OK to restart the computer and for changes
to take effect.
1. Insert the CD that comes with the motherboard and the screen below
would appear. Click VIA CN400 Chipset Drivers.
2. Click on Realtek AC’97 Codec Audio Driver to start the installation.
1. Insert the CD that comes with the motherboard and the screen below
would appear. Click VIA CN400 Chipset Drivers.
2. Click on VIA VT8235 VT8237 Integrated LAN Driver and the drivers
will automatically be installed.
1. Insert the CD that comes with the motherboard and the screen below
would appear. Click on LAN Card. On the next screen, click on Realtek
Network Interface Controller Drivers to start the installation process.
2. When the welcome screen appears, click Next to continue.
3. On the next screen, click Finish to restart the computer.
1. Insert the CD that comes with the motherboard and the screen below
would appear. Click VIA CN400 Chipset Drivers.
6. The following screen shows you the status of the installation. Click
Next to continue. When prompted, restart the computer for changes to
take effect and complete the installation process.
1. Insert the CD that comes with the motherboard and the screen below
would appear. Click VIA CN400 Chipset Drivers.
2. Click on VIA USB 2.0 Driver.
1. Insert the CD that comes with the motherboard and the screen below
would appear. Click VIA CN400 Chipset Drivers.
2. Click on VIA CN400 Display Controller Driver to start the
installation.
3. Click Finish to complete the installation.
Appendix
A. I/O Port Address Map
Each peripheral device in the system is assigned a set of I/O port
addresses, which also becomes the identity of the device. The following
table lists the I/O port addresses used.
Address Device Description
000h - 01Fh DMA Controller #1
020h - 03Fh Interrupt Controller #1
040h - 05Fh Timer
060h - 06Fh Keyboard Controller
070h - 07Fh Real Time Clock, NMI
080h - 09Fh DMA Page Register
0A0h - 0BFh Interrupt Controller #2
0C0h - 0DFh DMA Controller #2
0F0h Clear Math Coprocessor Busy Signal
0F1h Reset Math Coprocessor
1F0h - 1F7h IDE Interface
278 - 27F Parallel Port #2(LPT2)
2F8h - 2FFh Serial Port #2(COM2)
2B0 - 2DF Graphics adapter Controller
378h - 3FFh Parallel Port #1(LPT1)
360 - 36F Network Ports
3B0 - 3BF Monochrome & Printer adapter
3C0 - 3CF EGA adapter
3D0 - 3DF CGA adapter
3F0h - 3F7h Floppy Disk Controller
3F8h - 3FFh Serial Port #1(COM1)
Level Function
IRQ0 System Timer Output
IRQ1 Keyboard
IRQ2 Interrupt Cascade
IRQ3 Serial Port #2
IRQ4 Serial Port #1
IRQ5 Reserved
IRQ6 Floppy Disk Controller
IRQ7 Parallel Port #1
IRQ8 Real Time Clock
IRQ9 Reserved
IRQ10 Serial Port 3
IRQ11 Serial Port 4
IRQ12 PS/2 Mouse
IRQ13 80287
IRQ14 Primary IDE
IRQ15 Secondary IDE
SAMPLE CODE:
This code and information is provided "as is" without warranty of any kind,
either expressed or implied, including but not limited to the implied warranties of
merchantability and/or fitness for a particular purpose.
Filename Main.cpp
//===========================================================================
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
// PURPOSE.
//
//===========================================================================
#include <stdio.h>
#include <stdlib.h>
#include "W697HF.H"
//===========================================================================
int main (int argc, char *argv[]);
void copyright(void);
void EnableWDT(int);
void DisableWDT(void);
//===========================================================================
int main (int argc, char *argv[])
{
unsigned char bBuf;
unsigned char bTime;
char **endptr;
copyright();
if (argc != 2)
{
printf(" Parameter incorrect!!\n");
return 1;
}
if (Init_W697HF() == 0)
{
printf(" Winbond 83697HF is not detected, program abort.\n");
return 1;
}
bTime = strtol (argv[1], endptr, 10);
printf("System will reset after %d seconds\n", bTime);
EnableWDT(bTime);
return 0;
}
//===========================================================================
void copyright(void)
{
printf("\n======== Winbond 697HF Watch Timer Tester (AUTO DETECT) ========\n"\
" Usage : W697WD reset_time\n"\
" Ex : W697WD 3 => reset system after 3 second\n"\
" W697WD 0 => disable watch dog timer\n");
}
//===========================================================================
void EnableWDT(int interval)
{
unsigned char bBuf;
bBuf = Get_W697HF_Reg(0x29);
bBuf &= (~0x60);
bBuf |= 0x20;
Set_W697HF_Reg(0x29, bBuf); //enable WDTO
bBuf = Get_W697HF_Reg(0xF3);
bBuf &= (~0x04);
Set_W697HF_Reg( 0xF3, bBuf); //count mode is second
Filename W697hf.cpp
//===========================================================================
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
// PURPOSE.
//
//===========================================================================
#include "W697HF.H"
#include <dos.h>
//===========================================================================
unsigned int W697HF_BASE;
void Unlock_W697HF (void);
void Lock_W697HF (void);
//===========================================================================
unsigned int Init_W697HF(void)
{
unsigned int result;
unsigned char ucDid;
W697HF_BASE = 0x2E;
result = W697HF_BASE;
ucDid = Get_W697HF_Reg(0x20);
if ( ucDid == 0x60)
{ goto Init_Finish; }
W697HF_BASE = 0x4E;
result = W697HF_BASE;
ucDid = Get_W697HF_Reg(0x20);
if ( ucDid == 0x60)
{ goto Init_Finish; }
W697HF_BASE = 0x00;
result = W697HF_BASE;
Init_Finish:
return (result);
}
//===========================================================================
void Unlock_W697HF (void)
{
outportb(W697HF_INDEX_PORT, W697HF_UNLOCK);
outportb(W697HF_INDEX_PORT, W697HF_UNLOCK);
}
//===========================================================================
Filename W697hf.h
//===========================================================================
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
// PURPOSE.
//
//===========================================================================
#ifndef __W697HF_H
#define __W697HF_H 1
//===========================================================================
#define W697HF_INDEX_PORT (W697HF_BASE)
#define W697HF_DATA_PORT (W697HF_BASE+1)
//===========================================================================
#define W697HF_REG_LD 0x07
//===========================================================================
#define W697HF_UNLOCK 0x87
#define W697HF_LOCK 0xAA
//===========================================================================
unsigned int Init_W697HF(void);
void Set_W697HF_LD( unsigned char);
void Set_W697HF_Reg( unsigned char, unsigned char);
unsigned char Get_W697HF_Reg( unsigned char);
//===========================================================================
#endif //__W697HF_H
//---------------------------------------------------------------------------
int main (int argc, char *argv[])
{
if (Init_W697HF() == 0)
{
printf("Can not detect Winbond 83697HF, program abort.\n");
return(1);
}
return 0;
}
//---------------------------------------------------------------------------
void SetDioInupt(unsigned char data)
{
Set_W697HF_LD( 0x07); //switch to logic device 7
Set_W697HF_Reg(0xF1, ((data & 0x0F) << 4));
}
//---------------------------------------------------------------------------
unsigned char GetDioOutpt(void)
{
unsigned char result;
Filename W697hf.cpp
//===========================================================================
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
W697HF_BASE = 0x2E;
result = W697HF_BASE;
if (Get_W697HF_Reg(0x20) == 0x60)
{ goto Init_Finish; }
W697HF_BASE = 0x4E;
result = W697HF_BASE;
if (Get_W697HF_Reg(0x20) == 0x60)
{ goto Init_Finish; }
W697HF_BASE = 0x00;
result = W697HF_BASE;
Init_Finish:
return (result);
}
//===========================================================================
void Unlock_W697HF (void)
{
outportb(W697HF_INDEX_PORT, W697HF_UNLOCK);
outportb(W697HF_INDEX_PORT, W697HF_UNLOCK);
}
//===========================================================================
void Lock_W697HF (void)
{
outportb(W697HF_INDEX_PORT, W697HF_LOCK);
}
//===========================================================================
void Set_W697HF_LD( unsigned char LD)
{
Unlock_W697HF();
outportb(W697HF_INDEX_PORT, W697HF_REG_LD);
outportb(W697HF_DATA_PORT, LD);
Lock_W697HF();
}
//===========================================================================
void Set_W697HF_Reg( unsigned char REG, unsigned char DATA)
{
Unlock_W697HF();
outportb(W697HF_INDEX_PORT, REG);
outportb(W697HF_DATA_PORT, DATA);
Lock_W697HF();
}
//===========================================================================
unsigned char Get_W697HF_Reg(unsigned char REG)
{
unsigned char Result;
Unlock_W697HF();
outportb(W697HF_INDEX_PORT, REG);
Result = inportb(W697HF_DATA_PORT);
Lock_W697HF();
return Result;
}
//===========================================================================
Filename W697hf.h
//===========================================================================
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
// PURPOSE.
//
//===========================================================================
#ifndef __W697HF_H
#define __W697HF_H 1
//===========================================================================
#define W697HF_INDEX_PORT (W697HF_BASE)
#define W697HF_DATA_PORT (W697HF_BASE+1)
//===========================================================================
#define W697HF_REG_LD 0x07
//===========================================================================
#define W697HF_UNLOCK 0x87
#define W697HF_LOCK 0xAA
//===========================================================================
unsigned int Init_W697HF(void);
void Set_W697HF_LD( unsigned char);
void Set_W697HF_Reg( unsigned char, unsigned char);
unsigned char Get_W697HF_Reg( unsigned char);
//===========================================================================
#endif //__W697HF_H