Page 1
Copyright Copyright 2002 by ICP DAS. All rights are reserved. Trademark The names used for identification only may be registered trademarks of their respective companies. PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21) ----- 1...
1. Introduction The PCI-M512 is a battery-backup SRAM and digital I/O card. PCI bus, specification 2.1 On-board 512K bytes SRAM Two Li-batteries, BT1 & BT2, for battery-backup the data of SRAM Two indicators, low-battery & bad-battery, for battery BT1. Another two indicators, low-battery & bad-battery, for battery BT2.
Page 5
There are many demo programs, written in VC++, VB, Delphi, and BCB++, given in the companion CD. These demo programs call the DLL, PCIM512.DLL, to access the hardware of PCI-M512. The PCIM512.DLL will call the kernel driver, Windrvr.vxd or Windrvr.sys as follows:...
If any of these items are missing or damaged, contact the dealer from whom you purchased the product. Save the shipping materials and carton in case you want to ship or store the product in the future. PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21) ----- 6...
1.2 Installation Quick Start The PCI-M512 can be used in Windows 95/98/NT/2000/XP. The recommended installation steps are given in Sec 1.2.1 ~ Sec. 1.2.4 1.2.1 Step 1: Software Installation Step 1: insert the companion CD into the CD-ROM driver. It will auto run as follows: Step 2: click the first item, Toolkits (Softwares)/Manuals PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21)
Page 8
Step 3: click the first item, PCI Bus DAQ Card Step 4: click the last item, PCI-M512 Step 5: click the third item, Install Toolkit for Windows NT (Or 98, 2000, XP) Then the install shields will install the kernel driver, DLL driver & application demo program to system.
Step 2: Check the installed software Assume you use the default directory & name of install shields, the software will be installed in C:\DAQPRO as follows: Step 1: click C:\DAQPro as follow: Step 2: click PCI-M512 as follows: Demo demo program Driver for plug &...
Page 10
Step 4: Click PnPInstall to read this PDF file for plug & play installation. For Windows 98/2000/XP, the system will auto detect the PCI-M512 & ask you to install software driver. Read this PDF file carefully if you are not familiar with plug &...
Step 1: Install your PCI-M512 to PC Step 2: power on your PC Step 3: Now 98/2000/XP will find a PCI-M512 card & ask user to provide a software driver. Refer to PnPInstall.pdf, step3 of Sec. 1.2.2, for more information.
Page 12
Key-in new dwBoardNo to show IDs of another PCI-M512 as follows:. Refer to Sec. 2.2 for more information about IDs of PCI-M512 as follows: Vendor ID = 10B5 Device ID = 9050 Sub-vendor ID = 2129 Sub-device ID = 0512 PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21)
Page 13
Check that lowest 4-bits equal 0. These 4-bits are battery status bits. Refer to Sec. 2.4 for more information. Click Digital Output $5555 to write 0x5555 to D/O & Read D/I as follows: Key-in new dwBoardNo to read/write to other PCI-M512. Refer to Sec. 3.1 for more information. PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21)
Page 14
SRAM is given in R/W Offset Address, byte/word/dword read/write is given in Mode Byte/Word/Dword) Key-in new dwBoardNo to read/write to other PCI-M512. Refer to Sec. 3.1 for more information. Write 0x12345678 to offset address 0 of SRAM as follows: PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21)
Page 15
Read one byte of SRAM at offset address 0 as follows: Read one word of SRAM at offset address 0 as follows: Read one dword of SRAM at offset address 0 as follows: PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21) ----- 15...
1.2.5 Step 5: Muti-Board Diagnostic Step 1: run TestId2 of Delphi demo program to read & show IDs of two PCI-M512 as follows: (step7 of Sec. 1.2.2) Step 2: run TestDIO2 of Delphi demo program to read/write D/I/O of two PCI-M512 as follows: (step7 of Sec.
SRAM can keep all stored data if either BT1 or BT2 is higher then 2V. If either BT1 or BT2 is bad, it is recommended to replace both BT1 & BT2 with new batteries. PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21) ----- 17...
• Sub-device ID = 0512 The plug&play BIOS will assign proper resources to every PCI-M512 card in the power-on stage. The software driver of the PCI-M512 will use these IDs to access the hardware on PCI-M512. User must use PCIM512_DetectBoards() to detect all PCI-M512 boards first.
2.3 Block Diagram of D/I/O The PCI-M512 provides 16 channels of digital input and 16 channels of digital output. All levels are TTL compatible. The connections diagram and block diagram are given as follows: BT1 Low BT1 Bad BT2 Low...
Page 21
PC (not power off) replace the old BT1 with the new BT1 replace the old BT2 with the old BT2 Note: it is recommended to replace both BT1 & BT2 at the same time. PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21) ----- 21...
3. replace the old BT1 with the new BT1 4. replace the old BT2 with the old BT2 Note: it is recommended to replace both BT1 & BT2 at the same time. PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21) ----- 22...
Form C Relay Normal Open Normal Close Com. 20Pin cable DB-16R PCI-M512 Note: CN1=D/O Channel : 16 Form C Relay Relay : Switching up to 0.5A at 110AC or 1A at 24DCV PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21) ----- 24...
20-Pin connector for 16 channel digital output, A-82X, A-62X, DIO-64, ISO- DA16/DA8 Channel : 16 From A Relay , 8 From C Relay Relay : switching up to 5A at 110ACV / 5A at 30DCV PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21) ----- 25...
Digital output 8 Digital output 9 Digital output 10 Digital output 11 Digital output 12 Digital output 13 Digital output 14 Digital output 15 PCB ground PCB ground PCB +5V PCB +12V PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21) ----- 26...
3. DLL Driver The included software is a collection of subroutines for PCI-M512 cards for Windows 95/98/NT/2000/XP applications. These subroutines are written with C language and perform a variety of digital I/O operations. The subroutines in PCIM512.DLL are easy to understand as its name suggests for.
Page 28
Visual Basic 6 +--\PCIM512.BAS Declaration file |--\VC6 for Visual C6 |--\PCIM512.H Header file +--\PCIM512.LIB Linkage library for VC6 only |--\VCPP6 for Visual C++ 6 |--\PCIM512.H Header file +--\PCIM512.LIB Linkage library for VC++6 only PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21) ----- 28...
The plug&play BIOS will assign the proper base address to PCI-M512. If there is only one PCI-M512, users can identify this board as board_1. If there are two PCI-M512 boards in the system, it will be very difficult to identify which board is board_1.
DLL linkage purpose. • Syntax: short PCIM512_ShortSub(short nA, short nB) • Parameter: :[Input] 2 bytes short data type value :[Input] 2 bytes short data type value • Return: The value of nA – nB. PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21) ----- 32...
The value of iA – iB 3.2.4 PCIM512_GetDllVersion • Description: To get the version number of PCIM512.DLL • Syntax: DWORD PCIM512_GetDllVersion(void) • Parameter: None • Return: Return the DLL’s version number. For example: 102(hex) for version 1.02 PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21) ----- 33...
3.3.3 PCIM512_DetectBoards • Description : This subroutine will detect all installed PCI-M512 boards. This function must be called first before calling the DLL functions given in Sec 3.4 & Sec. 3.5. • Syntax : DWORD PCIM512_DetectBoards(); • Parameter : None •...
3.3.4 PCIM512_ReadBoardId • Description : This subroutine will show the IDs of detected PCI-M512 boards. It is designed to identify PCI-M512. • Syntax : DWORD PCIM512_ReadBoardId(dwBoardNo, *dwVendorId, *dwDeviceId, *dwSubVendorId, *dwSubdeviceId); • Parameter : dwBoardNo : [Input] PCI-M512 board number dwVendorID...
3.3.5 PCIM512_ReadBoardStatus • Description : This subroutine will detect the PCI-M512 boards the DLL open status. • Syntax : DWORD PCIM512_ReadBoardStatus(DWORD dwBoardNo); • Parameter : dwBoardNo [Input] PCI-M512 board number • Return: 0: The PCI-M512 board DLL is not opened.
This board is not opened. PCI_BoardNoExceedFindBoards Not fined the board 3.3.7 PCIM512_CloseAll • Description : This subroutine will close all of PCI-M512 kernel driver and release the resource from the device. • Syntax : DWORD PCIM512_CloseAll(); • Parameter : None •...
3.4 Functions of Sram Read/Write 3.4.1 PCIM512_WriteSramByte • Description: Write one byte, 8-bit, of data to SRAM of PCI-M512. • Syntax: DWORD PCIM512_WriteSramByte(dwBoardNo, dwOffset, Data) • Parameter: dwBoardNo : [Input] board number, from 1 to N dwOffset : [Input] offset address of SRAM, from 0 to 0x7ffff...
3.4.2 PCIM512_WriteSramWord • Description: Write one word, 16-bit, of data to SRAM of PCI-M512. • Syntax: DWORD PCIM512_WriteSramWord(dwBoardNo, dwOffset, Data) • Parameter: dwBoardNo : [Input] board number, from 1 to N dwOffset : [Input] offset address of SRAM, from 0 to 0x7fffe...
3.4.3 PCIM512_WriteSramDword • Description: Write one dword, 32-bit, of data to SRAM of PCI-M512. • Syntax: DWORD PCIM512_WriteSramDword(dwBoardNo, dwOffset, Data) • Parameter: dwBoardNo : [Input] board number, from 1 to N dwOffset : [Input] offset address of SRAM, from 0 to 0x7fffc...
3.4.4 PCIM512_ReadSramByte • Description: Read one byte, 8-bit, of data from SRAM of PCI-M512. • Syntax: DWORD PCIM512_ReadSramByte(dwBoardNo, dwOffset, *Data) • Parameter: dwBoardNo : [Input] board number, from 1 to N dwOffset : [Input] offset address of SRAM, from 0 to 0x7ffff...
3.4.5 PCIM512_ReadSramWord • Description: Read one word, 16-bit, of data from SRAM of PCI-M512. • Syntax: DWORD PCIM512_ReadSramWord(dwBoardNo, dwOffset, *Data) • Parameter: dwBoardNo : [Input] board number, from 1 to N dwOffset : [Input] offset address of SRAM, from 0 to 0x7fffe...
3.4.6 PCIM512_ReadSramDword • Description: Read one dword, 32-bit, of data from SRAM of PCI-M512. • Syntax: DWORD PCIM512_ReadSramDword(dwBoardNo, dwOffset, *Data) • Parameter: dwBoardNo : [Input] board number, from 1 to N dwOffset : [Input] offset address of SRAM, from 0 to 0x7fffc...
Functions of D/I/O Read/Write 3.5.1 PCIM512_WriteToDo • Description: Write one word, 16-bit, of data to D/O of PCI-M512. • Syntax: DWORD PCIM512_WriteToDo(dwBoardNo, Data) • Parameter: dwBoardNo : [Input] board number, from 1 to N Data : [Input] one word of data (16-bit) •...
3.5.2 PCIM512_ReadFromDi • Description: Read one word, 16-bit, of data from D/I & battery status bits of PCI-M512. • Syntax: DWORD PCIM512_ReadFromDi(dwBoardNo, *Data) • Parameter: dwBoardNo : [Input] board number, from 1 to N Data: [output] one word of data (16-bit), Bit0 ~ Bit3 are battery...
There are many demo program, written in VC++, VB, Delphi, and BCB++, given in the companion CD. These demo programs will call the DLL, PCIM512.DLL, to access the hardware of PCI-M512. The PCIM512.DLL will call the kernel driver, Windrvr.vxd or Windrvr.sys as follows:...
Access the SRAM/DI/DO …….. PCIM512_WriteSramDword(…) Access the SRAM/DI/DO ….. PCIM512_DriverClose() Close the Device-Driver User's Application Function Call into DLLs Development DLLs Toolkit Services Call into Kernel-Mode .VXDs, .SYSs (Device Driver) Device Control Hardware Devices PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21) ----- 48...
Then will reply as soon as possible to you. Please check that we had received your comments. And please keep in contact with us. ICP DAS E-mail: Service@icpdas.com Web Site: http://www.icpdas.com http://www.icpdas.com.tw PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21) ----- 49...
Need help?
Do you have a question about the PCI-M512 and is the answer not in the manual?
Questions and answers