69
ITA-5831 User Manual
Chapter 6
G
PIO Programming
Guide
Function Call for Reference
......................................................................................................................................
ICH SMBUS Access Code
(The following code is realized by simulating the access of BIOS to
SMBUS. It uses Borland C++.
3.1 for compiling and is successfully tested under DOS (But it is not
tested under other OSs).
#define SMBUS_PORT 0xF040 //SMB_BASE is 0xF040
typedefunsigned char BYTE;
/////////////////////////////////////////////////////////////////////
BYTE
smbus_read_byte(BYTE addr, BYTE offset)
//Read SMBUS Register byte value. Read one byte value each time. ddr
is slave
address (such as 0x40), and offset is register offset.
{
int i;
BYTE data;
outportb(SMBU 4, (addr | 1)); //Write slave address to
SM 4 (When reading, bit 0 of slave address should be set as 1,
so here addr|1 is available)
newiodelay();
//delay
newiodelay();
//delay
chk_smbus_ready(); //Whether SMBUS is ready
outportb(SMBU 3, offset);//Write register offset to
SMB_BASE +3.
newiodelay();
//delay
newiodelay();
//delay
outportb(SMBU 2, 0x48); //Write SMBUS command to
SM 2. 0x48 means starting byte data transmission
newiodelay();
//delay
newiodelay();
//delay
for (i = 0; i <= 0x100; i++)
{
newiodelay();
//longerdelay
}
Summary of Contents for ITA-5831 Series
Page 10: ...ITA 5831 User Manual x ...
Page 14: ...ITA 5831 User Manual 4 1 5 System Diagram Figure 1 1 ITA 5831 System Diagram ...
Page 16: ...ITA 5831 User Manual 6 ...
Page 17: ...Chapter 2 2 H W Installation Introduction Jumpers and Connectors I O Connectors ...
Page 26: ...ITA 5831 User Manual 16 ...
Page 29: ...19 ITA 5831 User Manual Chapter 3 System Setup Figure 3 2 Mini PCIe Installation ...
Page 34: ...ITA 5831 User Manual 24 Figure 3 10 Battery Module ITA BA61 00A1E ...
Page 37: ...Chapter 4 4 BIOS Settings ...
Page 64: ...ITA 5831 User Manual 54 ...
Page 68: ...ITA 5831 User Manual 58 ...
Page 69: ...59 ITA 5831 User Manual Chapter 5 Driver Installation ...
Page 72: ...ITA 5831 User Manual 62 ...
Page 73: ...Chapter 6 6 GPIO Programming Guide ...
Page 84: ...ITA 5831 User Manual 74 ...
Page 85: ...Appendix A A Watchdog Timer ...
Page 90: ...ITA 5831 User Manual 80 ...
Page 91: ...Appendix B B BSMI RoHS Declaration ...
Page 93: ...Appendix C C Chinese Language Safety Instructions and Battery Information ...