background image

 

AEWIN Technologies Co., Ltd                                                                                                                      PM-6101 User Manual 

32 

 

3.1 GPIO Sample Program for DOS environment   

 

#include <stdio.h> 

#include <string.h> 

#include <dos.h> 

#include <stdlib.h> 

#include <inlines/pc.h> 

 

#define index_port  0x2E 

 

 

 

 

//Super IO Index port address 

#define data_port  0x2F 

 

 

 

 

//Super IO Data port address 

#define GPIO_port 0x378 

#define GPIO_read_port GPI 3 

 

void Enter_sio_config(); 

void Exit_sio_config(); 

void ENABLE_GPIO(); 

void Input_mode(); 

void Output_mode(); 

void help(); 

 

int main(int argc, char *argv[]) 

{               

 

int data_rw8; 

 

                if (argc<2){ 

 

 

help(); 

 

 

return; 

 

 

 

ENABLE_GPIO(); 

 

                if(strcmp(argv[1], "-i") == 0){ 

 

 

Input_mode(); 

 

 

data_rw8 = inportb(GPIO_read_port); 

 

 

if ((data_rw8&0x01) == 0x00) 

 

 

 

printf("GPI0 -> Low\n"); 

Содержание PM-6101

Страница 1: ...se Date Update 1 0 2012 08 07 Release 1 1 2012 08 29 Correct Pin define for LVDS Backlight CMOS PM 6101 PC 104 Plus module with onboard AMD G series T16R or T40R AMD A55E chipset DDR3 up to 4GB 2 x Giga LAN Onboard VGA LVDS SATA CF socket 4 x USB 2 x COM GPIO DC 5V input ...

Страница 2: ...lity for any inaccuracies that may be contained in this manual The original manufacturer reserves the right to make improvements to the products described in this manual at any time without prior notice All other product names mentioned herein are used for identification purpose only and may be trademarks and or registered trademarks of their respective companies While reasonable efforts have been...

Страница 3: ...R214A p n 46L IUSB03 00 p n 46L IPOW82 01 p n TBD If any of those items are missing or damaged please contact with sales representative or distributor Model Name Description PM 6101A S06 PC 104 Plus with AMD T16R onboard VGA LVDS 2 x Giga LAN COM USB SATA CF socket DC 5V input PM 6101A S10 PC 104 Plus with AMD T40R onboard VGA LVDS 2 x Giga LAN COM USB SATA CF socket DC 5V input PM 6101B S06 PC 10...

Страница 4: ...set to the correct voltage in your area If you are not sure about the voltage of the electrical outlet you are using contact your local power company If the power supply is broken do not try to fix it by yourself Contact a qualified service technician or your retailer Before installing the motherboard and adding devices on it carefully read all the manuals that came with the package Before using t...

Страница 5: ...3 2 JP2 for PCI 104 Vio voltage selectDDDDDDDDDDDDDDDD15 2 3 3 JP3 for watchdog timer select DDDDDDDDDDDDDDDDD 15 2 3 4 JP4 for AT ATX mode select DDDDDDDDDDDDDDDDDD16 2 3 5 JP5 for COM2 select DDDDDDDDDDDDDDD DDDD17 2 3 6 JP6 for Clean CMOS DDD DDDDDDDDDDDDDD DDD 18 2 4 The pin define of onboard pin header DDDDDDDDDD D D 19 2 4 1 CN2 for LVDS connectorDDDDDDDDDDDDDDD D 19 2 4 2 CN1 for VGA pin ha...

Страница 6: ...DDD DD32 3 2 WatchDog timer DOS sample code DDDDDDDD DDD D D 39 2 4 10 CN15 for LPC connector 26 CN14 for battery connector 26 2 4 11 CN16 for USB 0 1 27 CN17 for USB 2 3 27 2 4 12 CN18 for COM2 422 485 28 CN19 for COM1 RS232 28 2 4 13 CN20 for COM2 RS232 29 2 4 14 CN21 for LAN1 LAN2 30 2 4 15 CN23 for HDA connector 31 ...

Страница 7: ... interface with 300MB s transfer rate 4 x USB 2 0 HD Audio onboard 2 x Gigabit Ethernet provided by Intel i211AT Gigabit Ethernet 1 x RS232 422 485 1 x RS232 8 bit GPIO and 1 x CompactFlash socket support Type 2 CompactFlash card PM 6101 operating at single DC 5V input AEWIN offer 5 year start from release date longevity with the option of purchasing an extended 2 year supply via contract beyond t...

Страница 8: ...Integrated graphic AMD Radeon HD 6000 series Graphic VGA interface 1 x internal VGA interface LVDS interface 1 x 18 bit single channel LVDS interface SATA interface 1 x SATAII up to 300 MB s SSD interface 1 x CompactFlash socket Ethernet 2 x Intel i211AT or i210AT Gigabit ethernet Expansion interface 1 x PC 104 Plus COM 1 x RS422 485 1 x RS232 USB 4 x USB 2 0 Audio 1 x HDA audio pin header need to...

Страница 9: ...5E Chipset 1 x SATA2 300 MB s JMD330A 2 x Intel Giga LAN 4 x USB 2 0 BIOS SPI LPC Super IO 1 x DDR3 SO DIMM 1 x 18 bit Single CH LVDS 1 x RS232 1 x RS422 485 WDT H W monitor GPIO SATA PCIe SATA CF socket USB DDR3 PCI PCI 04 connector PCI PC 104 ITE8888G VGA DP0 HDA HAD Audio pin header X4 UMI Link ...

Страница 10: ...AEWIN Technologies Co Ltd PM 6101 User Manual 10 1 4 Board Layout Dimension ...

Страница 11: ...ologies Co Ltd PM 6101 User Manual 11 1 5 IO ports AMD G series CPU PCI 104 connector AMD A55E 2 x Giga LAN 2 x COM PC 104 connector VGA LVDS SATA Dual USB DC input DDR3 SO DIMM CompactFlash Socket Intel Giga LAN ...

Страница 12: ...nnector CN9 12V 5V DC input CN10 Front Panel pin header CN11 Power Button CN12 FAN connector CN13 GPIO pin header CN14 LPC port pin header Label Function CN15 External Battery connector CN16 USB ports 0 1 CN17 USB ports 2 3 CN18 COM2 RS422 485 connector CN19 COM1 RS232 connector CN20 COM2 RS232 connector CN21 LAN1 LAN2 connector CN22 SATA connector CN23 HAD connector DIMM 1 x SO DIMM on solder ide...

Страница 13: ... 6101 User Manual 13 2 2 The location of onboard jumpers Label Function JP1 Panel Voltage VCC select JP2 PCI 104 Vio voltage select JP3 WDT select JP4 AT ATX mode select JP5 COM2 mode select JP6 Clear CMOS JP1 JP2 JP3 JP4 JP5 JP6 ...

Страница 14: ...AEWIN Technologies Co Ltd PM 6101 User Manual 14 2 3 The function list of onboard jumpers setting 2 3 1 JP1 for LVDS Panel Vcc select JP1 Closed Pin Result 1 2 3 3V 2 3 5V Default setting 3 1 JP1 ...

Страница 15: ...o Ltd PM 6101 User Manual 15 2 3 2 JP2 for PCI 104 Vio voltage select 2 3 3 JP3 for WDT select JP2 Closed Pin Result 1 2 5V 2 3 3 3V Default setting JP3 Closed Pin Result 1 2 IRQ11 2 3 Reset Default setting 3 1 JP2 3 1 JP3 ...

Страница 16: ...AEWIN Technologies Co Ltd PM 6101 User Manual 16 2 3 4 JP4 for AT ATX mode select JP4 Closed Pin Result 1 2 AT mode 2 3 ATX mode Default setting 3 1 JP4 ...

Страница 17: ...AEWIN Technologies Co Ltd PM 6101 User Manual 17 2 3 5 JP5 for COM2 select JP5 Closed Pin Result 1 2 RS232 3 4 RS422 5 6 RS485 Default setting 5 1 JP5 6 2 ...

Страница 18: ...6101 User Manual 18 2 3 6 JP6 for clean CMOS JP6 Closed Pin Result 1 2 Hold CMOS 2 3 Clear CMOS Default setting 3 1 JP6 If you want to clean the CMOS data set jumper to 2 3 just for few seconds Then Move the jumper back to 1 2 pin ...

Страница 19: ... header 2 4 1 CN2 for LVDS connector CN6 2 x 10 header connector type DF13A 20DP 1 25V Pin Signal Pin Signal 1 TXP2 2 TXN2 3 GND 4 GND 5 TXP1 6 TXN1 7 GND 8 VCC_LCD 9 TXP0 10 TXN0 11 TXP3 12 TXN3 13 GND 14 GND 15 N C 16 N C 17 LBKLT_EN_DELAY 18 VCC_LCD 19 AUX_N 20 AUX_P CN2 2 1 19 20 ...

Страница 20: ...0 2 4 2 CN1 for VGA connector CN7 2 x 8 header pitch 2 00 mm Pin Signal Pin Signal 1 CRT_RED 2 CRT_GREEN 3 CRT_BLUE 4 5VP0 5 GND 6 GND 7 GND 8 GND 9 V_CRTCON 10 GND 11 V5P0 12 CRT_DDC_SDA 13 CRT_HSYNC 14 CRT_VSYNC 15 CRT_DDC_SCL 16 N C CN1 1 2 15 16 ...

Страница 21: ...d PM 6101 User Manual 21 2 4 3 CN3 for 5V DC input 2 4 4 CN4 for 12V DC input CN9 1 x 4 header Pin Signal Pin Signal 1 V5P0 2 V5P0 3 GND 4 GND CN3 CN12 1 x 2 header pitch 2 00 mm Pin Signal Pin Signal 1 GND 2 V12P0 CN4 1 4 1 2 ...

Страница 22: ...Backlight Control 2 4 6 CN6 for 5V_SB DC input and PS_ON CN12 1 x 5 header pitch 2 00 mm Pin Signal Pin Signal 1 12VP0 2 GND 3 LBKLT_EN_DELAY 4 LCD_BKB_CTRL 5 5VP0 CN5 CN13 1 x 4 header pitch 2 0 mm Pin Signal Pin Signal 1 V5P0_STBY 2 V5P0_STBY 3 GND 4 PS_ON CN6 5 1 1 4 ...

Страница 23: ...AEWIN Technologies Co Ltd PM 6101 User Manual 23 2 4 7 CN9 for 5V 12V DC input CN13 1 x 4 header pitch 2 0 mm Pin Signal Pin Signal 1 V5P0 2 GND 3 N C 4 V12P0 CN9 1 4 ...

Страница 24: ... for Front Panel CN11 for Power Button CN14 1 x 8 header pitch 2 0 mm Pin Signal Pin Signal 1 PWR_LED_N 2 GND 3 HDD_LED_N 4 HDD_LED_N 5 SYSRST_N 6 GND 7 SPKR_PU 8 BEEP_SPKR_R_N CN15 1 x 2 header pitch 2 0 mm Pin Signal Pin Signal 1 PWRSW 2 GND CN10 CN11 1 8 1 2 ...

Страница 25: ...for Fan connector CN13 for GPIO ports CN17 1 x 2 header pitch 2 0 mm Pin Signal Pin Signal 1 V5P0 2 GND CN15 1 x 10 header pitch 2 0 mm Pin Signal Pin Signal 1 V3P3 2 GPIO10 3 GPIO11 4 GPIO12 5 GPIO13 6 GPIO14 7 GPIO15 8 GPIO16 9 GPIO17 10 GND CN13 CN12 1 2 1 10 ...

Страница 26: ...LPC connector CN14 for Battery connector CN19 2 x 5 header pitch 2 0 mm Pin Signal Pin Signal 1 V3P3 2 LAD0 3 LAD1 4 LAD2 5 LAD3 6 LFRAME_N 7 RST_N 8 5VP0 9 LPC1_33 MHz 10 GND CN19 1 x 2 header pitch 2 0 mm Pin Signal Pin Signal 1 BAT2_R 2 GND CN15 CN14 2 1 1 2 9 10 ...

Страница 27: ...CN20 2 x 5 header pitch 2 0 mm Pin Signal Pin Signal 1 VCC 2 VCC 3 USB_PN_1 4 USB_PN_0 5 USB_PP_1 6 USB_PP_0 7 GND 8 GND 9 N C 10 GND CN20 2 x 5 header pitch 2 0 mm Pin Signal Pin Signal 1 VCC 2 VCC 3 USB_PN_3 4 USB_PN_2 5 USB_PP_3 6 USB_PP_2 7 GND 8 GND 9 N C 10 GND CN16 CN17 1 2 9 10 1 2 9 10 ...

Страница 28: ...r COM1 RS232 Connector CN21 1 x 4 header pitch 2 00 mm Pin Signal Pin Signal 1 485_RXD 2 485_RXD 3 485_TXD 4 485_TXD CN21 2 x 5 header pitch 2 00 mm Pin Signal Pin Signal 1 DCD_N_CON 2 DSR_N_CON 3 SIN_CON 4 RTS_N_CON 5 SOUT_CON 6 CTS_N_CON 7 DTR_N_CON 8 RI_N_CON 9 GND 10 N C CN18 CN19 1 2 9 10 1 4 ...

Страница 29: ... 6101 User Manual 29 2 4 13 CN20 for COM2 RS232 Connector CN20 2 x 5 header pitch 2 00 mm Pin Signal Pin Signal 1 DCD_N_CON 2 DSR_N_CON 3 SIN_CON 4 RTS_N_CON 5 SOUT_CON 6 CTS_N_CON 7 DTR_N_CON 8 RI_N_CON 9 GND 10 N C CN20 1 2 9 10 ...

Страница 30: ...IN2 4 LAN1_L_MDIN0 5 LAN1_L_MDIP3 6 LAN1_L_MDIP1 7 LAN1_L_MDIN3 8 LAN1_L_MDIN1 9 V3P3 10 GND 11 LAN1_ACT_N_R 12 LAN1_LINK_N 13 LAN1_LINK100_N_R 14 LAN1_LINK1000_N 15 GND 16 GND 17 LAN2_L_MDIP0 18 LAN2_L_MDIP2 19 LAN2_L_MDIN0 20 LAN2_L_MDIN2 21 LAN2_L_MDIP1 22 LAN2_L_MDIP3 23 LAN2_L_MDIN1 24 LAN2_L_MDIN3 25 LAN2_ACT_N_R 26 LAN2_LINK_N 27 LAN2_LINK100_N 28 LAN2_LINK1000_N 29 GND 30 GND CN21 1 2 29 3...

Страница 31: ...Note Need to purchase AEWIN s audio module cable to make audio function work CN20 2 x 6 header pitch 2 00 mm Pin Signal Pin Signal 1 V5P0 2 GND 3 GND 4 HDA_BIT_CLK_Coded 5 V3P3 6 N C 7 HDA_SDIN0 8 HDA_SYNC_Codec 9 GND 10 HDA_RST_N_Codec 11 HDA_SDOUT 12 HDA_SDATA_IN1 CN23 2 1 11 12 ...

Страница 32: ...IO Index port address define data_port 0x2F Super IO Data port address define GPIO_port 0x378 define GPIO_read_portGPIO_port 3 void Enter_sio_config void Exit_sio_config void ENABLE_GPIO void Input_mode void Output_mode void help int main int argc char argv int data_rw8 if argc 2 help return ENABLE_GPIO if strcmp argv 1 i 0 Input_mode data_rw8 inportb GPIO_read_port if data_rw8 0x01 0x00 printf GP...

Страница 33: ...printf GPI2 Low n else printf GPI2 High n if data_rw8 0x08 0x00 printf GPI3 Low n else printf GPI3 High n if data_rw8 0x10 0x00 printf GPI4 Low n else printf GPI4 High n if data_rw8 0x20 0x00 printf GPI5 Low n else printf GPI5 High n if data_rw8 0x40 0x00 printf GPI6 Low n else printf GPI6 High n if data_rw8 0x80 0x00 printf GPI7 Low n else printf GPI7 High n ...

Страница 34: ...data_rw8 inportb GPIO_port 0xFE outportb GPIO_port data_rw8 else if strcmp argv 1 h1 0 printf GPO1 High n Output_mode data_rw8 inportb GPIO_port 0xFD data_rw8 0x02 outportb GPIO_port data_rw8 else if strcmp argv 1 l1 0 printf GPO1 Low n Output_mode data_rw8 inportb GPIO_port 0xFD outportb GPIO_port data_rw8 else if strcmp argv 1 h2 0 printf GPO2 High n Output_mode data_rw8 inportb GPIO_port 0xFB d...

Страница 35: ...O_port 0xF7 data_rw8 0x08 outportb GPIO_port data_rw8 else if strcmp argv 1 l3 0 printf GPO3 Low n Output_mode data_rw8 inportb GPIO_port 0xF7 outportb GPIO_port data_rw8 else if strcmp argv 1 h4 0 printf GPO4 High n Output_mode data_rw8 inportb GPIO_port 0xEF data_rw8 0x10 outportb GPIO_port data_rw8 else if strcmp argv 1 l4 0 printf GPO4 Low n Output_mode data_rw8 inportb GPIO_port 0xEF outportb...

Страница 36: ...PIO_port data_rw8 else if strcmp argv 1 h6 0 printf GPO6 High n Output_mode data_rw8 inportb GPIO_port 0xBF data_rw8 0x40 outportb GPIO_port data_rw8 else if strcmp argv 1 l6 0 printf GPO6 Low n Output_mode data_rw8 inportb GPIO_port 0xBF outportb GPIO_port data_rw8 else if strcmp argv 1 h7 0 printf GPO7 High n Output_mode data_rw8 inportb GPIO_port 0x7F data_rw8 0x80 outportb GPIO_port data_rw8 e...

Страница 37: ... time outportb index_port 0x87 outportb index_port 0x07 Super IO Selct Bank Register Number outportb data_port 0x03 Select logical device 7 outportb index_port 0x30 outportb data_port 0x01 void Exit_sio_config Exit F81865 Configuration outportb index_port 0xAA void ENABLE_GPIO int BusNum 0x00 bus0 int DevFunc 0xA3 device20 function3 int RegNum 0x44 reg44 long int data_rw32 data_rw32 BusNum 8 DevFu...

Страница 38: ...rtb index_port 0xF0 outportb data_port 0x41 Exit_sio_config void Output_mode Enter_sio_config outportb index_port 0xF0 outportb data_port 0x40 Exit_sio_config void help printf AEWIN GPIO Program n printf Usage GPIO i Show GPI Settings n printf Usage GPIO hx Set GPO Value to high n printf x 0 7 n printf Usage GPIO lx Set GPO Value to low n printf x 0 7 n ...

Страница 39: ...ort address define data_port 0x2F Super IO Data port address void Enter_sio_config void Exit_sio_config void help int main int argc char argv int data_rw8 if argc 2 help return if strcmp argv 1 s 0 Show Watchdog Register Settings Enter_sio_config outportb index_port 0xF5 data_rw8 inportb data_port 0x08 if data_rw8 0x00 second mode outportb index_port 0xF6 data_rw8 inportb data_port printf Second m...

Страница 40: ...ndex_port 0xFA data_rw8 inportb data_port 0x01 outportb data_port data_rw8 outportb index_port 0xF5 data_rw8 inportb data_port 0xF7 0x31 outportb data_port data_rw8 sscanf argv 2 d data_rw8 outportb index_port 0xF6 outportb data_port data_rw8 printf Watchdog Timer will count down for d second s n data_rw8 else if strcmp argv 1 m 0 Set Time out Value if argv 2 NULL help return else Enter_sio_config...

Страница 41: ...8 Exit_sio_config return void Enter_sio_config Enter F81865 Configuration outportb index_port 0x87 delay 1 Delay some time outportb index_port 0x87 outportb index_port 0x07 Super IO Selct Bank Register Number outportb data_port 0x07 Select logical device 7 outportb index_port 0x30 outportb data_port 0x01 void Exit_sio_config Exit F81865 Configuration outportb index_port 0xAA void help printf AEWIN...

Страница 42: ...N Technologies Co Ltd PM 6101 User Manual 42 printf xxx 1 255 seconds n printf xxx 0 Time out Disable n printf Usage WDT m xxx Set Time out Value n printf xxx 1 255 minutes n printf xxx 0 Time out Disable n ...

Отзывы: