background image

 

79

HANDLE m_hWDT=NULL; 

TCHAR szClassName[60]; 

... 

// assign the WDT driver name 

wsprintf(szClassName, TEXT("WDT1:")); 

// Open the WDT driver 

m_hWDT = CreateFile(szClassName, GENERIC_READ | GENERIC_WRITE, 0, 

NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); 

if ( m_hWDT == INVALID_HANDLE_VALUE )   

DebugMsg(CString("WDT driver fail")); 

return; 

... 

DWORD dwTemp; 

DWORD nPeriod=10000; 

// Set the Watchdog Timer as 10 seconds (10000 mini-seconds) 

DeviceIoControl(m_hWDT, IOCTL_SET_WDTPERIOD, &nPeriod, 4, NULL, 0, &dwTemp, NULL); 

// Enable the Watchdog timer 

DeviceIoControl(m_hWDT, IOCTL_ENABLE_WDT, NULL, NULL, NULL, 0, &dwTemp, NULL); 

While (1)   

// do your job here... 

Sleep(8000); 

DeviceIoControl(m_hWDT, IOCTL_ACCESS_WDT, NULL, NULL, NULL, 0, &dwTemp, NULL); 

DeviceIoControl(m_hWDT, IOCTL_DISABLE_WDT, NULL, NULL, NULL, 0, NULL, NULL); 

CloseHandle(m_hWDT); 

 

Содержание SPC-57

Страница 1: ...SPC 57 5 7 STN LCD Smart Panel Computer with IntelR XscaleR CPU and Windows R CE NET Users Manual...

Страница 2: ...sponsibility for its use nor for any infringements upon the rights of third parties that may result from such use Acknowledgements IBM PC AT PS 2 and VGA are trademarks of International Business Machi...

Страница 3: ...believed to be causing harmful interference to radio or television reception this can be determined by turning the equipment on and off If interference is occurring the user is encouraged to try to c...

Страница 4: ...able for SPC 57E only If any of these items are missing or damaged contact your distributor or sales representative immediately Additional Information and Assistance Step 1 Visit the Advantech web sit...

Страница 5: ...he equipment is not used for a long time disconnect it from the power source to avoid damage by transient over voltage 12 Never pour any liquid into an opening This may cause fire or electrical shock...

Страница 6: ...disclaims all responsibility for the accuracy of any statements contained herein...

Страница 7: ...ngeren Zeitraum nicht benutzt sollten Sie es vom Stromnetz trennen Somit wird im Falle einer berspannung eine Besch digung vermieden 12 Durch die L ftungs ffnungen d rfen niemals Gegenst nde oder Fl...

Страница 8: ...General Information This chapter gives background Information of the SPC 57 Sections include Introduction Specification LCD Specification Touchscreen Specification Power I O ports Mounting Dimension a...

Страница 9: ...f I O by designing their own back for seamless integration Dust and spill resistant IP65 rated front bezel for protection from dust and water damage Fanless and ultra low power consumption Compact siz...

Страница 10: ...l backup battery Boot loader 1MB AMD Flash ROM for boot loader Display LCD 5 7 STN QVGA 320 x 240 Touch screen 4 wire resistant touch screen VGA chip PXA 255 internal I O RS 232 Full 9 pin RS 232 X 3...

Страница 11: ...card by themselves to store the image file and boot from CF card WDT PXA 255 internal RTC HT1381 backup by internal backup battery Boot loader 1MB AMD Flash ROM for boot loader Display LCD 5 7 STN QV...

Страница 12: ...hanical Dimension 210 X 155 X 41 mm Material SPCC Certification CE FCC class A UL Back cover Without back cover without I O board Environmental Operating temp 0 degree C 50 degree C Storage temp 20 de...

Страница 13: ...ponse time Rise 300 ms Fall 80 ms Lamp lifetime 20000 hours 1 4 Touchscreen Specifications Type Resistive Base glass construction Tempered Glass Resolution Continuous Light transmission 75 typical Dur...

Страница 14: ...1 6 I O Ports Arrangement RS 232 RS 485 Line out jack RJ 45 USB Client USB Host Power Connector Power Switch PCMCIA Slot CompactFlash TypeII Slot...

Страница 15: ...1 7 Mounting...

Страница 16: ......

Страница 17: ...1 8 Dimension and cutout...

Страница 18: ...CHAPTER 2 Getting Start This chapter provides brief instructions for operating the SPC 57...

Страница 19: ...to the system power supply Step4 Plug in the power lines and turn on the system power switch you will see the Welcome screen of Windows CE NET Then you can start to use SPC 57 Step5 Turn on the power...

Страница 20: ...Vcc GND 4 Plug the male power connector into female power connector in SPC...

Страница 21: ......

Страница 22: ...ower switch 2 1 2 Supplying Power to SPC 57E 1 SPC accepts only DC power not AC power 2 The DC input range for SPC is 10V 28V 3 Use the power cable in SPC 57E package to connect the board of SPC 57 an...

Страница 23: ...Power Connector Connect to the power source 4 If the power cable included in the SPC 57E package is not suitable to users application users have to make their own cable to supply power to SPC...

Страница 24: ...CHAPTER 3 The Engine of the SPC 57 This chapter details hardware s setting and functionality in the SPC 57 Sections include PCM 7230 SBC for SPC 57 I O Board LCD and touch screen Power system...

Страница 25: ...one mainboard and one I O board The mainboard is slightly modified based on Advnatech standard product PCM 7230 to fulfill SPC 57 specification In this manual we will still use PCM 7230 to mean the m...

Страница 26: ...ction transceiver level RS 232 COM3 full function transceiver level RS 232 COM4 RS 485 w AFC Ethernet 10 100 BASE T Ethernet Port USB host port 2 X USB 1 1 host ports USB Client Port USB Client Port f...

Страница 27: ...cator On board IO_VCC3P3 indicator beside CN12 CF interface busy indicator beside CN20 Pin header SYS_VCC3P3 CF card busy indicator PCMCIA card busy indicator battery status indicator LAN link LAN spe...

Страница 28: ......

Страница 29: ......

Страница 30: ...Figure 3 1 The PCM 7230 for SPC 57 Block Diagram...

Страница 31: ...nectors This section locates headers and connectors of PCM 7230 and describes their functionality CN9 CN3 CN12 JP1 CN14 JP4 CN29 CN31 CN20 JP2 CN1 CN8 CN10 CN11 J1 CN18 CN26 JP6 JP3 Figure 3 2 Compone...

Страница 32: ...r switch header CN 1 PCMCIA accessing status port CN 3 multi function I O header I CN 8 CRT out header CN 9 multi function I O header II CN 12 HotKey function header CN 14 memory module 100 pin board...

Страница 33: ...the pin headers all the other connectors have white mark at 1st pin 3 4 4 5 6 7 2 1 The following tables are the pin definition of all the connectors on PCM 7230 SBC JP 1 CPLD JTAG port there are two...

Страница 34: ...POW_SW_N connect to power switch negative pole Note Only pin 1 is shorted with pin 2 of JP4 the system power is on CN 1 PCMCIA accessing s tatus port Pin Number Pin Function Ps 1 Resv 2 Resv 3 PCM_RD...

Страница 35: ...eaker out function 29 LINE_OUT_RP 30 LINE_OUT_LP 31 AC97_AGND 32 AC97_AGND 33 LINE_IN_L left channel of audio line in port 34 LINE_IN_R right channel of audio line in port 35 MIC_IN audio microphone i...

Страница 36: ...X100P Lan TX signal 2 TPTX100N Lan TX signal 3 TPRX100P Lan RX signal 4 TPRX100N Lan RX signal 5 RJ45_P4_P5 LAN connector P4 P5 in order to avoid noise 6 RJ45_P7_P8 LAN connector P7 P8 in order to avo...

Страница 37: ...st host signal 54 USB1_N USB 1st host signal 55 USB2_V USB 2ed host power 5V 56 GND 57 USB2_P USB 2ed host signal 58 USB2_N USB 2ed host signal CN 12 HotKey function header Pin Number Pin function Ps...

Страница 38: ...D_D2 12 LCD_D3 13 LCD_D4 14 LCD_D5 15 LCD_D6 16 LCD_D7 17 LCD_D8 18 LCD_D9 19 LCD_D10 20 LCD_D11 21 LCD_D12 22 LCD_D13 23 LCD_D14 24 LCD_D15 25 LCD_D16 26 LCD_D17 27 LCD_D18 28 LCD_D19 29 LCD_D20 30 L...

Страница 39: ...ader Pin Number Pin function Ps 1 SYS_VCC 5V 2 GND 3 ENVBK5V inverter enable signal 4 BLCTRL_SW backlight strength switch 5 Resev reserve pin for future 6 GND 7 Power_LED System power LED indicator 3...

Страница 40: ...viously written for half duplex RS 232 environments can be maintained without need for modification 3 1 5 LAN Ethernet Connector CN9 Pin1 Pin6 The PCM 7230 is equipped with one Davicom DM9000 10 100 B...

Страница 41: ...30 with the 4 wire touch screen The PCM 7230 supports 4 wire resistive touch screen Figure 3 7 shows the cable connected to this connector 3 1 13 8 DI 8 DO pin header CN3 Pin7 Pin24 GPIO pin header CN...

Страница 42: ...f Memory Module Figure 3 5 Solder side of Memory Module 3 1 16 Backup Battery BT1 The PCM 7230 series build in one 3 0V coin type rechargeable backup battery for external RTC This backup battery is ch...

Страница 43: ...can expand its I O function thru two I O cables The expand functions have RS 232 1 COM1 RS 485 1 COM4 Audio Line out RJ 45 for Ethernet port USB Client 2 port USB Host Power connector 10 28 V Power sw...

Страница 44: ...RS 232 Serial Port 2 CN6 COM4 RS 485 Serial Port 3 CN2 Audio Line out Port 4 CN5 RJ 45 for Ethernet Port 5 CN3 USB Client Port 6 CN1 USB Host Port 7 CN9 Power Connector 8 SW1 Power Switch 9 CN10 Power...

Страница 45: ...45 Pin Signal 1 DCD 2 RXD 3 TXD 4 DTR 5 GND 6 DSR 7 RTS 8 CTS 9 RI Figure 3 8 I O Board COM1 RS 232 serial port CN 4 RS 485 serial port...

Страница 46: ...N C 5 GND 6 N C 7 N C 8 N C 9 N C Figure 3 8 I O Board COM4 RS 485 serial port CN 2 Audio Line out port Pin Signal 1 Right channel 2 Left channel 3 GND 4 Left channel Figure 3 9 I O Board Audio Line o...

Страница 47: ...ure 3 10 I O Board RJ 45 for Ethernet port CN 3 USB Client port Pin Signal 1 TPTX100P 2 TPTX100N 3 TPRX100P 4 N C 5 N C 6 TPRX100N 7 N C 8 N C 9 NC 10 NC 11 GND 12 GND 13 LED1 14 nLINK 15 LED2 16 nSPE...

Страница 48: ...11 I O board USB client port CN 1 USB Host port F 3 12 I O Board USB Host port CN 9 Power Connector Pin Signal 1 USB_VCC5 2 SA_BUSB_DNR 3 SA_BUSB_DPR 4 GND Pin Signal 1 VCC_USB_H1 2 USB_N1 3 USB_P1 4...

Страница 49: ...I O Board Power connector CN 10 Power source to Main Board Figure 3 13 I O Board Power source to main board CN 7 Multi function I O header I Pin Signal 1 19 VDC 2 19 VDC 3 GND Pin Signal 1 GND 2 GND 3...

Страница 50: ...D 3 UART1_RTXD 4 UART1_RDTR 5 GND 6 UART1_RDSR 7 UART1_RRTS 8 UART1_RCTS 9 UART1_RRI 10 IO_VCC3P3 11 C950_485_RTXP 12 C950_485_RTXN 13 GND 14 GND 15 SPK_OUTRP 16 SPK_OUTLP 17 USB_VCC5 18 GND 19 SA_BUS...

Страница 51: ...2 19 AC97_AGND 20 AC97_AGND 3 3 Power system The power system of the SPC 57 includes IO board adapter and power cord Users can only use a Terminal Block 5 08mm 3P MALE 19Vdc power adapter to be SPC 57...

Страница 52: ...details the Windows CE NET operating system on the Sections include Introduction Windows CE Startup Procedure Upgrade Procedure Utilities Network Intel Persistent Storage Manger Application Program D...

Страница 53: ...on solid state disk possible which implies higher robustness to harsh environments Figure 4 1 Windows CE NET on the SPC Series 4 2 Windows CE Startup Procedure Windows CE can be loaded by two methods...

Страница 54: ...flash ROM The upgrade procedure is described as following Step1 Copy Upgrade utility and image files you want for example NK NB0 EBOOT NB0 and WINDOWSCE BMP to CF storage card Note NK NB0 is WinCE im...

Страница 55: ...PSM 4 4 Utilities There are several useful utilities added in the standard Windows CE NET OS 4 4 1 Regflash The utility Regflash is a convenient tool to save overwrite or delete registry data as well...

Страница 56: ...ool to reset the system From the Windows CE NET status bar tap Start Run Use the soft keyboard to input reboot command in the command text box and press OK The other ways to reboot are clicking the Re...

Страница 57: ...tem reboot windows tty exe and windows registry exe would automatically execute Be sure that the two methods are independent It means they can be used simultaneously 4 4 4 Safemode SPC allow user to a...

Страница 58: ...in the General page And the versions of each part of the installed embedded OS including Windows CE NET Registry Bootloader and System Configurator respectively Figure 4 7 General information 4 4 5 2...

Страница 59: ...on he can press setting button Then the backlight page of Display Properties of Control Panel will appear on the screen Besides user can click the Off Now button to turn off the backlight of the displ...

Страница 60: ...tes 5 minutes and 10 minutes The Enable button is used to simulate the Watchdog function Detail programming guide is illustrated at section 4 7 5 The Sleep button could make the system enter suspend m...

Страница 61: ...s pressed the 8 DI will try to retrieve external inputs then those pins having positive inputs will mark respective radial buttons inside the Digital Input Status block others will make their radial b...

Страница 62: ...y by type the directory in the edit box and press Set button The new setting would become effective after the system reboot The CF Disk Folder Name block specifies the folder name of the storage card...

Страница 63: ...to get specific IP addresses Then fill them into the associated fields of the Properties Dialog that could be popped up by the properties item of the step 3 above Then use the Regflash utility to sav...

Страница 64: ...keep the default settings of the ports connection 7 Click PC Connection icon in the Control Panel As the PC Connection Properties dialogue box pops up change the connection to the newly made connecti...

Страница 65: ...lick Next 3 Click Configure to setup the device according to the specification of your modem and then click OK on the top right corner of the window 4 Click Next Input the telephone number in the Phon...

Страница 66: ...66 Figure 4 16 Networking via PPP 4 5 4 Web browser The SPC builds in Windows CE OS includes IE Browser It can be used to browse web pages on World Wide Web via LAN or PPP...

Страница 67: ...isk like storage such as storage cards redundant RAM and ROM 4 6 2 IPSM folder in SPC Series SPC uses Intel Persistent Storage Manger to utilize the free space of flash ROM for persistent storage The...

Страница 68: ...ven though the source code may not be changed at all 4 7 1 System requirements Intel Pentium 90 CPU or more advanced Microsoft Windows 2000 Professional or Windows XP Microsoft eMbedded Visual Tools 4...

Страница 69: ...w chart of Building Windows CE NET runtime 4 7 3 How to install SDK Copy SPC SDK file SOM_A_SDK msi to your PC and launch it You can install SDK by steps Step 1 Launch SPC SDK file and then tap Next b...

Страница 70: ...70 Step 2 Accept License Agreement and go next Figure 4 19 Step 3 Key in your information and go next...

Страница 71: ...71 Figure 4 20 Step 4 Choose setup type There are 3 options Embedded Visual C Microsoft NET Compact Framework and Documentation in Custom Setup Figure 4 21...

Страница 72: ...72 Figure 4 22 Step 5 Tap Install button to install SDK Figure 4 23...

Страница 73: ...73 Install SDK Figure 4 24 Step6 Finish installing...

Страница 74: ...s requirements of handling the system resources such as Watchdog timer and LCD brightness control etc Programmers who are familiar with WIN32 API programming would feel very easy to use this DLL to cr...

Страница 75: ...n to be performed and the type of device on which the operation is to be performed No specific values are defined for the dwIo ControlCode parameter However the writer of a custom device driver can de...

Страница 76: ...by lpBytesReturned After such an operation the value of the variable is without meaning lpOverlapped in Ignored set to NULL Return Values Nonzero indicates success Zero indicates failure To get exten...

Страница 77: ...g time setting Its value should be greater 1000 The unit is mini second If your application opens the WDT driver the default Watchdog timer is set to 5000 mini seconds nInBufferSize unused lpOutBuffer...

Страница 78: ...function is disabled nInBufferSize unused lpOutBuffer unused nOutBufferSize unused 8 IOCTL_SET_SCREENOFF 0x1010 Set the LCD power off immediately lpInBuffer unused nInBufferSize unused lpOutBuffer unu...

Страница 79: ...g WDT driver fail return DWORD dwTemp DWORD nPeriod 10000 Set the Watchdog Timer as 10 seconds 10000 mini seconds DeviceIoControl m_hWDT IOCTL_SET_WDTPERIOD nPeriod 4 NULL 0 dwTemp NULL Enable the Wat...

Страница 80: ...SMQ Microsoft Foundation Classes MFC Object Exchange Protocol OBEX Pocket Outlook Object Model POOM API Simple Object Access Protocol SOAP Toolkit Standard SDK for Windows CE NET NET Compact Framework...

Страница 81: ...vers HTTPD File Systems and Data Store Feature Default Selection Storage Manager File Database Replication Bit based File System Internal RAM ROM File System Registry Storage RAM based Registry Fonts...

Страница 82: ...orer Multiple Language API Internet Explorer TV Style Navigation URL Moniker Services Windows Internet Services Pocket Internet Explorer HTML View WEBVIEW Sample IE 5 5 Internet Options Control Panel...

Страница 83: ...ell and User Interface Feature Default Selection Shell User Interface Accessibility Customizable UI Mouse Touch Display Stylus Network User Interface Overlapping Menus Software Input Panel Speech Inte...

Страница 84: ...h Registry on CF Image on Flash Memory Boot Failure 2 Boot by Default Registry Boot Success Image on CompactFlash Image on Flash Memory Boot by Registry on CF Image on CompactFlash Image on Flash Memo...

Страница 85: ...85...

Отзывы: