Advantech PCM-9588 user manual Gpio Sample Code, RA02 Start

Page 89

C.2 GPIO Sample Code

;=============================================================== NEWIODELAY Macro

out 0ebh,al

ENDM ;===============================================================

.model small

.486p

.stack 256

.data

;===============================================================

;Data Area ;===============================================================

SMBus_Port

EQU

500h

PCA9554_ID

EQU

40h

PCA9554_ID2

EQU

4Eh

Input_Reg

EQU

00h

Output_Reg

EQU

01h

Inversion_Reg

EQU

02h

Configure_Reg

EQU

03h

;RA02 Advantech_Str

db 'Advantech Company Copyright (C) 2005 Design by

Duncan',0AH,0Dh,'$'

 

Advantech_Str

db 'Advantech Company Copyright (C) 2005 Design by Duncan,

Modify by Steven',0AH,0Dh,'$' ;RA02

GX3_Fun_Str

db

'Check Philip GPIO function.',0Ah,0Dh,'$'

Note1_Str

db

'Test Method: GPIO 0 connect to GPIO 1.',0Ah,0Dh,'$'

Note2_Str

db

'GPIO 2 connect to GPIO 3.',0Ah,0Dh,'$'

Note3_Str

db

'GPIO 4 connect to GPIO 5.',0Ah,0Dh,'$'

Note4_Str

db

'GPIO 6 connect to GPIO 7.',0Ah,0Dh,'$'

Success1_Str

db

'First GPIO Chip Test success !! ',0Ah,0Dh,'$'

Success2_Str

db

'Second GPIO Chip Test success !! ',0Ah,0Dh,'$'

;RA02 - START

 

 

 

Success_lenght EQU

($ - offset Success1_Str) / 2

 

db

'Third GPIO Chip Test success !!

',0Ah,0Dh,'$'

db

'Fouth GPIO Chip Test success !!

',0Ah,0Dh,'$'

db

'Fifth GPIO Chip Test success !! ',0Ah,0Dh,'$'

db

'Sixth GPIO Chip Test success !!

',0Ah,0Dh,'$'

db

'Seventh GPIO Chip Test success !!',0Ah,0Dh,'$'

db

'Eighth GPIO Chip Test success !! ',0Ah,0Dh,'$'

;RA02 - END

 

 

 

Fail_Str

db

'First GPIO Chip Test Fail !! ',0Ah,0Dh,'$'

Fail2_Str

db

'Second GPIO Chip Test Fail !! ',0Ah,0Dh,'$'

;RA02 - START

 

 

 

Fail_lenght EQU

($ - offset Fail_Str) / 2

 

db

'Third GPIO Chip Test Fail !! ',0Ah,0Dh,'$'

Appendix C Programmable GPIO & Watchdog Timer

79

PCM-9588 User Manual

Image 89
Contents PCM-9588 Acknowledgements CopyrightWarranty Period Product Warranty 2 yearsRepairs under Warranty Exclusions from WarrantyFCC Class a Declaration of ConformityTechnical Support and Assistance Packing List Optional accessoriesOrdering information Model Number DescriptionPage Contents Appendix a Introduction & InstallationOptional Extras for the PCM-9588 Page Chapter Introduction Product SpecificationsChipset Functional SpecGeneral Introduction Other chipset Chipset ICH6M I/OElectrical Specifications Mechanical SpecificationsWeight g with Cooler 480 g Power supply VoltagePCM-9588 ATX Power Consumption Operating Humidity Environment SpecificationsPage W Installation Jumper list Jumper SettingsJumpers JP9 Backlight control select JP8 LCD Panel Power SelectJumper description Connector list ConnectorsConnector Settings Connector ListInverter connector CN6 Power connector CN5VGA connector CN8 Lvds connector CN92.12 PC-104 plus connector CN17 IDE Connector CN16COM port connector CN19, CN41 USB connectors CN20, CN28, CN38DVI interface connector CN30 2.20 -V5 and -V12 connector CN27Sata Connector CN31 and CN32 LAN LED connector CN34Mechanical Jumper and Connector LocationsBoard Dimension Layout Component Side Board DimensionsPage Bios Operation Bios Setup Bios IntroductionMain Menu Standard Cmos Features Advanced Bios Features Boot Up Floppy Seek Disabled First / Second / Third / Other Boot DriveBoot Up NumLock Status Disabled Boot Up NumLock StatusEnabledAdvanced Chipset Features Integrated Peripherals Onboard Device OnChip IDE DeviceSuper IO Device Onboard Serial port 1 3F8Power Management Setup Power Management Min Saving Run VGA Bios if S3 Resume AutoHDD Power Down Disabled Suspend Mode 1 HourReset Configuration Data Disabled 7 PnP/PCI ConfigurationsPCI VGA Palette Snoop Disabled Init Display First PCI SlotPC Health Status Shutdown Temperature DisabledCurrent System/CPU Temp Show Only V / 3.3 V / 5 V / 12 V Show OnlyFrequency/voltage Control Load Optimized DefaultsSpread Spectrum Disabled To Establish Password Set PasswordTo Disable Password Save & Exit SetupTo Change Password Quit Without Saving Page W Introduction & Installation S/W Introduction Driver InstallationWindows XP Professional Other OSSusi Functions Susi Application LibrarySusi Introduction VGA Control API Susi InstallationWatchdog API Hardware Monitor APIWindows CE Express InstallationManual Installation Susi Sample Programs Windows Graphics ModeSample Programs SusiDemo.exeTest Read Single Input Pin GpioTest Read Multiple Input Pin Test Write Single Output Pin4.5 I2C Test Write Multiple Output PinsRead a byte Write a byteRead a word SMBusWrite Multiple bytes Write a wordRead Multiple bytes Brightness control VGA ControlScreen on/off control Watchdog Hardware Monitor Page Extension I/O Installation PCI PC-104 plusAppendix a CN4 Audio connector CN2 CD in connectorTable A.1 CN2 CD In connector Table A.2 CN4 Audio connectorTable A.3 CN5 Power connector CN5 Power connectorCN8 VGA connector CN6 Inverter connectorTable A.4 CN6 Inverter connector Table A.5 CN8 VGA connectorTable A.6 CN9 Lvds connector CN9 Lvds connectorTable A.7 CN10 TTL connector High Bits CN10 TTL connector High BitsTable A.8 CN11 TTL connector Low Bits CN11 TTL connector Low BitsTable A.9 CN12 LAN connector CN12 LAN connector11 CN15 LPT / FDD connector 10 CN13 HDD LED and Power LEDTable A.10 CN13 HDD LED and Power LED Table A.11 CN15 LPT / FDD connectorTable A.12 CN16 IDE connector 12 CN16 IDE connectorTable A.13 CN17 PC-104/+ Connector 13 CN17 PC104-plus connectorTable A.14 CN19 COM1~4 Connector 14 CN19 COM1~4 connector16 CN22 Reset Button connector 15 CN20 USB1/2 ConnectorTable A.15 CN20 USB1/2 Connector Table A.16 CN22 Reset Bottom Connector18 CN24 SIR connector 17 CN23 Power Button connectorTable A.17 CN23 Power Button Connector Table A.18 CN24 SIR Connector20 CN26 CF Typeii connector 19 CN25 PS2 Keyboard/Mouse connectorTable A.19 CN25 PS2 Keyboard/Mouse connector Table A.20 CN26 CF Typeii connectorTable A.21 CN27 -V5 and -V12 connector 21 CN27 -V5 and -V12 connectorTable A.22 CN28 USB3/4 Connector 22 CN28 USB3/4 Connector23 CN29 DDR2 Sodimm Socket Table A.23 CN29 DDR2 Sodimm SocketTable A.24 CN30 DVI Connector 24 CN30 DVI connector26 CN32 Sata 2 connector 25 CN31 Sata 1 connectorTable A.25 CN31 Sata 1 connector Table A.26 CN32 Sata 2 connector28 CN34 LAN LED connector 27 CN33 Battery ConnectorTable A.27 CN33 Battery Connector Table A.28 CN34 LAN LED Connector30 CN37 GPIO2 Connector 29 CN36 GPIO1 ConnectorTable A.29 CN36 GPIO1 Connector Table A.30 CN37 GPIO2 Connector32 CN41 COM 5/6 RS-422 / 485 connector 31 CN38 USB5/6 ConnectorTable A.31 CN38 USB5/6 Connector Table A.32 CN41 COM 5/6 / 422 / 485 connectorAppendix B Table B.1 PCM-10586-9588E Cable kit for PCM-9588 PCM-10586-9588E Cable kit for PCM-9588Appendix C Watchdog Timer RA02 Start Gpio Sample CodeRA02 Start Ax=5E78 RA02 Start Mov Bx,0400h Int 15h RA02 END Check GPI 1,3,5,7 value RA02 Start CH device ID Newiodelay Push ax push cx Mov Dx,SMBusPort +04h Al,ch Clc Mov Cx,0800h ChkI2cOK Al,dx Get status END Page Appendix D Power requirement Input PowerOver-current protection Rising timeTable D.1 I/O Port I/O Port