Home

ESA PCIDIOT User Manual - Electro Systems Associates

image

Contents

1. 4 P2A 0 7 PAO E 1 7 4 P1C4 1 2 P1C5 1 2 P2C4 1 5 P265 DA Ez 1 P162 P1C3 T P262 H A P263 SET j P160 H P1C1 N P260 H t P261 PAS Lag ij P1B6 s S P187 1 P2B6 Pa 8 P2B7 PM a j P184 z s P185 1 P2B4 H k P2B5 PAS as j P1B2 n P183 f P282 A i P2B3 us eel 2 j P1B0 i P1B1 ff P280 u P2B1 ij P1A6 NS PIA7IT P2A6 m M P2A7 4 RD 5 a gt Eli P2B 0 7 j P1A4 18 P1A5 1 P2A4 17 18 P2A5 ij WR 4 36 AD Reo 1 P1A2 35 P1A3 f P2A2 P P2A3 ij LBEO or ia ij P1A0 Mi 2 PIAI fi P2A0 Dm om P2A1 1 LBE1 x gs Hs Vgc fi Pice FEET PGTI voe Pace c m P207 f RESET 38 BESET PB4 25 26 5 2 1 6S1 8 BE pas aA pao 7 CON26A E CON26A PB7 2 P855 P2C0 7 JA PC1 re y er D DS EXTCLK 1 7 PC4 ro fee OUT el e POS EXTCLK 0 arm ES GATE 2 indt Essen 4 SYSCLK 16 sTo SYSCLK 8 ila mo ES fl t SYSCLK 4 x 2 5 nn bo i 2 GATE 0 T pi 3 osi in 0d el ED 2 gs svscuknel g ouo 4 03 So ba st ExTeLK o 15PN D FE MALE 21 Be a Ouro 5 1svscuse I 215 UO kidde JP2 1 14 i HH D7 NS FS Sar EXTCLK 1 22 1 E zm aeie 2 pr SS svserwa I 18 6 1 kt 20 0 G2 Hz bare K LIEXTOLK 2 AT OUT2 OUT 2 NS je CS2 8254 vec Ct 1 C2 C3 Ca C5 CB C7 1 C9 C10 C11 C14 C15 pum oime J oime J o J oime J oime J oime oime 3 Lommer Jome Jo
2. Signal 8255 26 PIN Connector U5 J4 P2A0 4 21 P2A1 3 22 P2A2 2 19 P2A3 1 20 P2A4 40 17 P2A5 39 18 P2A6 38 15 P2A7 37 16 P2BO 18 13 P2B1 19 14 P2B2 20 11 P2B3 21 12 P2B4 22 9 P2B5 23 10 P2B6 24 7 P2B7 25 8 P2CO0 14 5 P2C1 15 6 P2C2 16 3 P2C3 17 4 P2C4 13 1 P2C5 12 2 P2C6 11 23 P2C7 10 24 VCC 26 25 GND 7 26 ESA PCIDIOT User Manual Page 56 of 60 Solder Side PCI Signal Details Pin 5V Description 1 TRST Test Logic Reset 2 12V_ 12 VDC 3 TMS Test Mode Select 4 TDI Test Data Input 5 5V 5VDC 6 INTA Interrupt A 7 NTC linteruptc 8 5V 45 VDC 9 RESVO1 Reserved VDC 10 5V V VO 5 V or 3 3 V 11 RESV03 Reserved VDC 12 GNDO03 Ground or Open Key 13 GNDO5 Ground or Open Key 14 RESV05 Reserved VDC 15 RESET Reset 6 5V V VO 5 V or 3 3 V 17 GNT Grant PCI use 18 GNDO08 Ground 19 RESVO06 Reserved VDC 20 AD30 Address Data30 231 43 8V01 k3 35 VDC 22 AD28 Address Data 28 23 AD26_ Address Data 26 24 GND10 Ground 25 AD24 Address Data 24 26 IDSEL Initialization Device Select 27 3 3V03 3 3 VDC 28 AD22 Address Data 22 29 AD20 Address Data 20 30 GND12 Ground 31 AD18 Address Data 18 32 AD16 Address Data 16 33 3 3V05 3 3 VDC ESA PCIDIOT User Manual Page 57 of 60 34 FRAME A
3. ESA PCIDIOT User Manual Page 13 of 60 4 Write 82551PortA PURPOSE Writes the data to the 8255 1 U6 PortA of ESA PCIDIOT Hardware PROTOTYPE void Write 82551PortA unsigned char Data PARAMETERS Name Type Input Output Data unsigned char Input DESCRIPTION Name Description Data Used for specifying the data to be written RETURN VALUE NONE EXAMPLE Write 82551PortA 0x80 ESA PCIDIOT User Manual Page 14 of 60 5 Write 82551 PortB PURPOSE Writes the data to the 8255 1 U6 PortB of ESA PCIDIOT Hardware PROTOTYPE void Write 82551 PortB unsigned char Data PARAMETERS Name Type Input Output Data unsigned char Input DESCRIPTION Name Description Data Used for specifying the data to be written RETURN VALUE NONE EXAMPLE Write 82551 PortB 0x80 ESA PCIDIOT User Manual Page 15 of 60 6 Write 82551 PortC PURPOSE Writes the data to the 8255 1 U6 PortC of ESA PCIDIOT Hardware PROTOTYPE void Write 82551 PortC unsigned char Data PARAMETERS Name Type Input Output Data unsigned char Input DESCRIPTION Name Description Data Used for specifying the data to be written RETURN VALUE NONE EXAMPLE Write 82551 PortC 0x80 ESA PCIDIOT User Manual Page 16 of 60 7 Read 82551 PortA PURPOSE Reads the data from the 8255 1 U6 PortA of ESA PCIDIOT Hardware PROTOT
4. Tid FRAME 14d DEVSEL 769 RDY 89 TROY Lock STOP 289 PERR Ad SERR 148 NTA RST EECS EESK EEDI EEDO 143 EED TEST VDD VDD VDD VDD VDD VDD VDD VDD VDD VDD u8 PCI 9052 vss vss vss vss vss vss vss vss vss vss LADO LADI LAD2 LAD3 LAD4 LAD5 LADS LAD LAS LWR cso LBEO LBE1 RD WR LRESET cst cs2 cs3 LINTH LINTI2 Lad LAS LAG LAT LAB LCLK BCLKO MODE Appendix A Schematics A Bt az A3 BS Ge ug as U9 Bs H3 A o En 2705 u6 AB B8 lle fole ij en e o ro 74LS245 8255 l RESET 2 Vee Imi Imi Ot Vgc s e 104 P1A 0 7 P1B 0 7 P1C 0 7 son R1 10K SYSCLK 4 D 9 pe 74LS14 1 i SYSCLK 8 ESA PCIDIOT User Manual 74LS163 10K Cc 5 6 74LS14 B 4 B gt SYSCLK 16 1 3 74LS14 Cer ESA PVTLTD BANGALORE Tie ESA PCIDIOT Bize Document Number F Date Tuesday January 03 2006 Bheet Tore Page 51 of 60 2
5. install bat from the command window For uninstalling the driver close all the applications that are using this driver Double click on uninst bat or run uninst bat from the command windows Uninstalling the Driver Delete the Devices listed in Device Manager Under ESA Hardware Tab From My Computer Properties like ESA PCIDIOT Delete windrvr6 sys amp windrvr6 inf from windir system32 drivers Delete esapdiot dll from Y windir Ex C Windows or C winnt Delete oemxx inf Windows2k XP from windir inf directory or esa inf from windir inf other Windows 98 Restart the PC NOTE On Windows 2000 XP NT the inf files will be created with oemXX inf under windir inf To find the inf file corresponding to ESA PCIDIOT card user can search the INF directory for the ESA PCIDIOT as a search text ESA PCIDIOT User Manual Page 9 of 60 4 0 Driver Libraries Description Function Reference 1 ESAPCIDIOT Open PURPOSE Provides Device Handle to access Driver kernel module All other APIs use the handle provided by this function and therefore this function must be called before calling any other API PROTOTYPE int ESAPCIDIOT Open int CardNo PARAMETERS Name Type Input Output CardNo Int Input DESCRIPTION Name Description CardNo Used for specifying the card number when multiple ESA PCIDIOT car
6. Add in Wizard C WINDOWS Desktop TDAS E ESS Extended Stored Proc Wizard Ex ISAPI Extension Wizard n Makefile Create new workspace a MFC ActiveX Controfwizard C Addite current workspace i MFC App wizard dll I Dependency of BA MFC App Wizard exe Fl J New Database Wizard UF NI Measurement Studio AppWizard qi Utility Project 8 Win32 Application Win32 Console pplication Platforms i Win32 Cancel 4 Enter the Project name and location where project working folder should be created 5 Click OK button 6 You should then see the following Dialog Box ESA PCIDIOT User Manual Page 37 of 60 Win32 Console Application Step 1 of 1 2 x What kind of Console Application do you want to create C An empty project i C A Hello World application C An application that supports MFC 7 Select the Simple Application and click Finish 8 Copy all Files from Lib folder available in Drivers CD to current working directory 9 Open the Application cpp file and add include esapdiot h and write the application using the Driver Libraries 11 Select Project gt Settings You should then see the following dialog box Project Settings 2 xl Settings For winz2 Debug General Debug C C Link Resourci Category General Dutput file name Debug temp exe Object library modules EsaSarayuUsbT das lil
7. Data 21 Co eo AD19 81 82 33 34 3 3V AD17 C BE2 GND13 Address Data 19 3 3 VDC Address Data 17 Command Byte Enable 2 Ground ESA PCIDIOT User Manual Page 59 of 60 Co ol 8 8 8 8 8 IRDY 3 3V06 DEVSEL GND16 LOCK PERR 3 3V08 Initiator Ready 3 3 VDC Device Select Ground Lock bus Parity Error 3 3 VDC no BEER SERR 3 3V09 C BE1 AD14 GND18 AD12 AD10 System Error 3 3 VDC Command Byte Enable 1 Address Data 14 Ground Address Data 12 Address Data 10 o EEE GND20 OPEN OPEN AD8 AD7 3 3V12 AD5 Ground Ground or Open Key Ground or Open Key Address Data 8 Address Data 7 3 3 VDG Address Data 5 C1 o BEEBE AD3 GND22 AD1 VCCO8 ACK64 VCC10 VCC12 Address Data 3 Ground Address Data 1 45 VDC Acknowledge 64 bit 5 VDC 5 VDC ESA PCIDIOT User Manual Page 60 of 60
8. VALUE Returns the data read from the specified 8254 U3 Timer of ESA PCIDIOT Hardware EXAMPLE Data Latch Timer 0 ESA PCIDIOT User Manual Page 28 of 60 19 Write TimerO PURPOSE Writes the data to the 8254 U3 TimerO of ESA PCIDIOT Hardware PROTOTYPE void Write TimerO unsigned char Data PARAMETERS Name Type Input Output Data unsigned char Input DESCRIPTION Name Description Data Used for specifying the data to be written RETURN VALUE NONE EXAMPLE Write TimerO 0x80 ESA PCIDIOT User Manual Page 29 of 60 20 Write _Timer1 PURPOSE Writes the data to the 8254 U3 Timer1 of ESA PCIDIOT Hardware PROTOTYPE void Write Timer1 unsigned char Data PARAMETERS Name Type Input Output Data unsigned char Input DESCRIPTION Name Description Data Used for specifying the data to be written RETURN VALUE NONE EXAMPLE Write Timer1 0x80 ESA PCIDIOT User Manual Page 30 of 60 21 Write Timer2 PURPOSE Writes the data to the 8254 U3 Timer2 of ESA PCIDIOT Hardware PROTOTYPE void Write Timer2 unsigned char Data PARAMETERS Name Type Input Output Data unsigned char Input DESCRIPTION Name Description Data Used for specifying the data to be written RETURN VALUE NONE EXAMPLE Write Timer2 0x80 ESA PCIDIOT User Manual Page 31 of 60 22 Read Timer0 PURPO
9. data from the specified address This address should be in the address range of Selected Card resources Use Chkdiot utility to know the Card resources PROTOTYPE unsigned char inportb unsigned int PortAddr PARAMETERS Name Type Input Output PortAddr Unsigned int Input RETURN VALUE Returns the data read from the specified address of ESA PCIDIOT Hardware EXAMPLE Data inportb 0x8000 ESA PCIDIOT User Manual Page 36 of 60 5 0 APPLICATION DEVELOPMENT USING DRIVER LIBRARIES e Section describes about the application development in VC 6 0 e Section Ill describes about the application development in VB 6 0 e Section Ill describes about the application development in LabWindows CVI e Section IV describes about the application development in DOS mode using Turbo C compiler MASM e Section V describes about the application development in MASM32 e Section V describes about the application development in JAVA 5 1 Visual C 6 0 VC Creating a New Console Application Project in Visual C 6 0 1 Start the Microsoft Developer Studio 2 Choose New from the File Menu 3 Select Projects Tab You should then see the following Dialog Box New 2 x Files Projects Workspaces Dther Documents ek ATL COM AppWizard Win32 Dynamic Link Libr Project name Tal Cluster Resource Type Wizard Win32 Static Library La Custom AppWizard Location 5 Database Project GE DevStudio
10. 1 0 2 0 3 0 4 0 5 0 CONTENTS INTRODUCTION sr ozrerrseerzerseererannnenenepenmendieds DESCRIPTION OF THE CIRCUIT INSTALLATION OF THE HARDWARE AND DRIVER SOFTWARE nnee DRIVER LIBRARIES DESCRIPTION APPLICATION DEVELOPMENT USING DRIVER LIBRARIES Appendix A Schematics Appendix B Component layout Appendix C Connector Details ESA PCIDIOT User Manual Page 1 of 60 ESA PCIDIOT PCI DIGITAL I O TIMER CARD FOR PCs 1 0 INTRODUCTION Electro Systems Associates Pvt Ltd manufactures a variety of microprocessor trainers development debugging tools and microcomputer development systems useful for educational institutions and R amp D labs ESA PCIDIOT card is a PCI based Digital Input Output Timer card for PC compatible systems The card contains two 8255 programmed peripheral interface PPI which provide 48 programmable I O lines for the user and one 8254 programmable interval timer which provide three programmable counter timers to the user ESA PCIDIOT can be plugged into any one of the free PCI slots of the system This card is accompanied by a Driver CD which contains Drivers amp supporting files CARD SPECIFICATIONS 8255 Two Nos Provide 48 I O lines 8254 One No Provides 3 Timers OUT Lines 3 Timer GATE Lines 3 Timer CLK Lines JUMPERS Used for setting the Input clock selecti
11. 2552PortA unsigned char Data PARAMETERS Name Type Input Output Data unsigned char Input DESCRIPTION Name Description Data Used for specifying the data to be written RETURN VALUE NONE EXAMPLE Write 82552PortA 0x80 ESA PCIDIOT User Manual Page 21 of 60 12 Write 82552PortB PURPOSE Writes the data to the 8255 2 U5 PortB of ESA PCIDIOT Hardware PROTOTYPE void Write 82552PortB unsigned char Data PARAMETERS Name Type Input Output Data unsigned char Input DESCRIPTION Name Description Data Used for specifying the data to be written RETURN VALUE NONE EXAMPLE Write 82552PortB 0x80 ESA PCIDIOT User Manual Page 22 of 60 13 Write 82552PortC PURPOSE Writes the data to the 8255 2 U5 PortC of ESA PCIDIOT Hardware PROTOTYPE void Write 82552PortC unsigned char Data PARAMETERS Name Type Input Output Data unsigned char Input DESCRIPTION Name Description Data Used for specifying the data to be written RETURN VALUE NONE EXAMPLE Write 82552PortC 0x80 ESA PCIDIOT User Manual Page 23 of 60 14 Read 82552PortA PURPOSE Reads the data from the 8255 2 U5 PortA of ESA PCIDIOT Hardware PROTOTYPE unsigned char Read 82552PortA void PARAMETERS NONE RETURN VALUE Returns the data read from the 8255 2 U5 PortA of ESA PCIDIOT Hardware EXAMPLE Data Read 82552Po
12. 32 Classes to be created Application CTemplApp in temp1 h and temp1 cpp Dialog CTemplDlg in temp1Dlg h and temp1Dlg cpp Features About box on system menu 3D Controls Uses shared DLL implementation MFC42 DLL ActiveX Controls support enabled Localizable text in English United States Project Directory C AWINDOWS Desktopstemp1 ESA PCIDIOT User Manual Page 41 of 60 9 Click OK Button 10 You should then see the following windows TE e eem facet a AE fd TTE DLL 11 Add the controls as per requirement 12 Add Callback functions for the controls by using the driver libraries 13 Copy esapdiot h esapdiot dll amp esapdiot lib Files from Lib folder which is available in Drivers CD 14 Select Project gt Settings Select Link Tab in the Dialog box 15 Specify Esapdiot lib at Object library modules Textbox 16 Click OK button 17 Build the application from Build Menu 18 Run the application Example Source is given in the Driver software CD under ExampleApp Source Folder ESA PCIDIOT User Manual Page 42 of 60 5 2 Visual Basic 6 0 VB Creating a Application Project in Visual BASIG 6 0 1 Start Microsoft Visual Basic 6 0 environment 2 Choose New Project from the File menu You should then see the following dialog B4 S i ENE Activex EXE Activex DLL ActiveX cme Control Help e eo 3 ES x A E H VB Application VB Wizard Data P
13. 8254 should be controlled by user as per his requirements ESA PCIDIOT User Manual Page 4 of 60 Packing List Before you begin installing ESA PCIDIOT Hardware please make sure that the following materials have been shipped to you y ESA PCIDIOT Hardware y ESA PCIDIOT Software CD containing Windows Driver Software amp Sample applications with source developed using VC 6 0 VB 6 0 Labwindows CVI MASM32 Turbo C amp MASM y ESAPCIDIOT User s Manual Minimum System Requirements IBM Compatible Pentium machine or above Windows 98 Windows NT Windows 2000 Windows XP Windows Me Microsoft Visual Studio Lab Windows CVI Development Environment 64 MB of RAM PCI Slot CD ROM Drive lt K C ww ox x NOTE To use the ESA PCIDIOT card in Windows 98 NT 2000 XP Environment user need to install Windows driver software and library files available on the Driver Software CD To use the card in DOS mode please refer chapter 5 5 DOS mode Application Development ESA PCIDIOT User Manual Page 5 of 60 3 0 Installation of the Hardware amp Driver Software 1 Switch off the PC 2 Remove the power cable from the PC 3 Plug the ESA PCIDIOT card in the free PCI slot available on the PC Motherboard 4 Plug the power cable to the PC 5 Switch on the PC 6 Windows OS will detect a new hardware and asks for the Installation of Driver NOTE The user must have administrative privileges on the tar
14. AppwWizard Win32 Dynamic Link Libr Project name i Cluster Resource Type Wizard Win32 Static Library temp1l Ea Custom AppWizard Location Database Project 3 DevStudio Add in Wizard C WINDOWS Desktop temp1 E ES Extended Stored Proc Wizard Me ISAPI Extension Wizard t Makefile Create new workspace a MFC ActiveX Controlwizard Add to current workspace MFC AppWizard dll Dependency of 44 MFC App Wizard exe 3X New Database Wizard ome z YF NI Measurement Studio AppWizard Ti Utility Project mal Win32 Application Win32 Console Application Platforms Iv win32 4 Enter the Project name and location where project working folder should be created 5 Click OK button 6 You should then see the following Dialog Box ESA PCIDIOT User Manual Page 40 of 60 MFC AppWizard Step 1 2 x What type of application would you like to create Application C Single document C Multiple documents jv Document view architecture support What language would you like your resources in English United States APP WZENU DLL 7 Select Dialog based radio button and click Finish 8 You should then see the following Dialog box with added classes Information New Project Information X App Wizard will create a new skeleton project with the following specifications Application type of temp Dialog Based Application targeting Win
15. SE Reads the data from the 8254 U3 TimerO of ESA PCIDIOT Hardware PROTOTYPE unsigned char Read TimerO void PARAMETERS NONE RETURN VALUE Returns the data read from the 8254 U3 TimerO of ESA PCIDIOT Hardware EXAMPLE Data Read Timer0 ESA PCIDIOT User Manual Page 32 of 60 23 Read Timer1 PURPOSE Reads the data from the 8254 U3 Timer1 of ESA PCIDIOT Hardware PROTOTYPE unsigned char Read_Timer1 void PARAMETERS NONE RETURN VALUE Returns the data read from the 8254 U3 Timer1 of ESA PCIDIOT Hardware EXAMPLE Data Read Timer1 ESA PCIDIOT User Manual Page 33 of 60 24 Read Timer2 PURPOSE Reads the data from the 8254 U3 Timer2 of ESA PCIDIOT Hardware PROTOTYPE unsigned char Read Timer2 void PARAMETERS NONE RETURN VALUE Returns the data read from the 8254 U3 Timer2 of ESA PCIDIOT Hardware EXAMPLE Data Read Timer2 ESA PCIDIOT User Manual Page 34 of 60 25 outportb PURPOSE Write the BYTE data to the specified address This address should be in the address range of Selected Card resources Use Chkdiot utility to know the Card resources PROTOTYPE void outportb unsigned int PortAddr unsigned char Data PARAMETERS Name Type Input Output PortAddr Unsigned int Input Data Unsigned Char Input RETURN VALUE NONE EXAMPLE Outportb 0xd803 0x80 ESA PCIDIOT User Manual Page 35 of 60 26 inportb PURPOSE Reads the BYTE
16. This allows the trusted operating system and drivers running in kernel mode to access the ports while preventing less trusted user mode processes from touching the I O ports and causing conflicts All user mode programs should talk to a device driver which arbitrates access The I O permission bitmap can be used to allow programs not privileged enough l e user mode programs the ability to access certain I O ports When an I O instruction is executed the processors will first check if the task is privileged enough to access the ports Should this be the case the I O instruction will be executed However if the task is not allowed to do I O the processor will then check the I O permission bitmap The I O permission bitmap as the name suggests uses a single bit to represent each I O address If the bit corresponding to a port is set then the instruction will generate an exception however if the bit is clear then the I O operation will proceed This gives a means to allow certain processes to access certain ports There is one I O permission bitmap per task ESA PCIDIOT User Manual Page 46 of 60 Accessing I O Ports under NT 2000 XP There are two solutions to solving the problem of I O access under Windows NT 2000 XP The first solution is to write a device driver which runs in ring 0 I O privilege level 0 to access your I O ports on your behalf Data can be passed to and from your user mode program to the device driver via IOCTL calls The d
17. YPE unsigned char Read 82551 PortA void PARAMETERS NONE RETURN VALUE Returns the data read from the 8255 1 U6 PortA of ESA PCIDIOT Hardware EXAMPLE Data Read 82551 PortA ESA PCIDIOT User Manual Page 17 of 60 8 Read 82551 PortB PURPOSE Reads the data from the 8255 1 U6 PortB of ESA PCIDIOT Hardware PROTOTYPE unsigned char Read 82551 PortB void PARAMETERS NONE RETURN VALUE Returns the data read from the 8255 1 U6 PortB of ESA PCIDIOT Hardware EXAMPLE Data Read 82551 PortB ESA PCIDIOT User Manual Page 18 of 60 9 Read 82551 PortC PURPOSE Reads the data from the 8255 1 U6 PortC of ESA PCIDIOT Hardware PROTOTYPE unsigned char Read 82551 PortC void PARAMETERS NONE RETURN VALUE Returns the data read from the 8255 1 U6 PortC of ESA PCIDIOT Hardware EXAMPLE Data Read 82551 PortC ESA PCIDIOT User Manual Page 19 of 60 10 Write 82552CR PURPOSE Writes the data to the 8255 2 U5 Command Register of ESA PCIDIOT Hardware PROTOTYPE void Write 82552CR unsigned char Data PARAMETERS Name Type Input Output Data unsigned char Input DESCRIPTION Name Description Data Used for specifying the data to be written RETURN VALUE NONE EXAMPLE Write 82552CR 0x80 ESA PCIDIOT User Manual Page 20 of 60 11 Write 82552PortA PURPOSE Writes the data to the 8255 2 U5 PortA of ESA PCIDIOT Hardware PROTOTYPE void Write 8
18. ddress or Data phase 85 GND14 Ground 36 TRDY Target Ready 37 GND15 Ground 38 STOP Stop Transfer Cycle 39 3 3V07 3 3 VDC 40 SDONE Snoop Done 41 SBO Snoop Back off 42 GND17 Ground SCS 43 PAR Parity 44 AD15 Address Datai5 45 43 3V10 43 3 VDC 46 AD13 Address Data 13 47 AD11 Address Data 11 48 GND19 Ground 49 AD9 Adaress Data 9 52 C BEO Command Byte Enable 0 53 3 3V11 3 3 VDC 54 AD6 Adaress Data 6 55 AD4 Address Data 4 56 GND21 Ground 57 AD2 Address Data 2 58 ADO Address Data 0 59 5V V VO 5 Vor 3 3 V 60 REQ64 Request 64 bit 61 VCC11 5 VDC 62 VCC13 5 VDC ESA PCIDIOT User Manual Page 58 of 60 Component Side PCI Signal Details elr 12V TCK GND 12 VDC Test Clock Ground TDO EN EEE 5V 5V INTB INTD Test Data Output 5 VDC 5 VDC Interrupt B Interrupt D c RES 8 PRSNT1 Reserved V I O 5 V or 3 3 V GND lalalalala PRSNT2 GND RES GND CLK GND Ground or Open Key Ground or Open Key Reserved VDC Reset Clock Ground Co REQ S NIB o 45V AD31 AD29 GND Request V I O 5 V or 3 3 V Address Data 31 Address Data 29 Ground N Co AD27 AD23 5892 AD25 3 3V C BE3 GND AD21 Address Data 27 Address Data 25 43 3VDC Command Byte Enable 3 Address Data 23 Ground Address
19. ds present on the PG If only one card present on the PC send 1 as the card number Card Numbers will be known from the PCI slots where ESA PCIDIOT cards installed RETURN VALUE Returns 0 on success 1 if CardNo is not matching with the Existing ESAPCIDOT48 cards 2 if No ESA PCIDIOT card existing ESA PCIDIOT User Manual Page 10 of 60 EXAMPLE int dwStatus dwStatus ESAPCIDIOT Open if dwStatus 2 Message Box NULL No ESA PCIDIOT Cards Found ERROR NULL Exit 0 if dwStatus 1 Message Box NULL Card No not matching with the existing cards ERROR NULL Exit 0 if dwStatus 0 Message Box NULL Card Found INFO NULL ESA PCIDIOT User Manual Page 11 of 60 2 ESAPCIDIOT Close PURPOSE Closes the Device Handle and frees resources allocated for the Device which was created by ESAPCIDIOT OpenY at start PROTOTYPE void ESAPCIDIOT Close PARAMETERS None RETURN VALUE None EXAMPLE ESAPCIDIOT Close ESA PCIDIOT User Manual Page 12 of 60 3 Write 82551CR PURPOSE Writes the data to the 8255 1 U6 Command Register of ESA PCIDIOT Hardware PROTOTYPE void Write 82551CR unsigned char Data PARAMETERS Name Type Input Output Data unsigned char Input DESCRIPTION Name Description Data Used for specifying the data to be written RETURN VALUE NONE EXAMPLE Write 82551CR 0x80
20. get computer in order to install the driver for Windows 2000 XP NT Found New Hardware Wizard Welcome to the Found New Hardware Wizard This wizard helps you install software for Dther PCI Bridge Device If your hardware came with an installation CD ZE or floppy disk insert it now What do you want the wizard to do Install from a list or specific location Advanced Click Next to continue If user selects Install the software automatically it will search for the suitable drivers in local drives and external media In Case it does not detect any suitable driver select Install from a list or specific location you should then see the following window ESA PCIDIOT User Manual Page 6 of 60 Found New Hardware Wizard Please choose your search and installation options paths and removable media The best driver found will be installed C Search removable media floppy CD ROM Include this location in the search F Modified reDist Driver v Don t search will choose the driver to install Choose this option to select the device driver from a list Windows does not guarantee that the driver you choose will be the best match for your hardware Found New Hardware Wizard Please wait while the wizard installs the software Haj ESA PCIDIOT esapdiot dll To D SWINDD Ww S Cancel ESA PCIDIOT User Manual Page 7 of 60 Found New Hardware Wizard Completing t
21. he Found New Hardware Wizard The wizard has finished installing the software for Ha ESA PCIDIOT Click Finish to close the wizard Finish After Installation is completed run the following command from the Command Prompt WindowsXP G Driver wdreg inf C windows system32 drivers windrvr6 inf install Windows 2000 G Driver wdreg inf C winnt system32 drivers windrvr6 inf install Windows 98 G Driver wdreg16 inf C windowssystem32 drivers Wwindrvr6 inf install NOTE Windows 98 requires a reboot after Installation of the driver for proper working of the ESA PCIDIOT card Batch files for the above are provided in the Drivers CD file names are reg98 bat Windows 98 reg2k bat Windows 2000 and regXP bat Windows XP User has to take care of the Drive names in the batch file while running these batch files ESA PCIDIOT User Manual Page 8 of 60 This Registering could be done for the reboot free installation of the Driver This could be done at the first time of installation Next time onwards driver will be activated automatically NOTE Windows NT Operating Systems doesn t support Plug amp Play feature User has to do manual installation of the driver for the card Go to the WINNT folder in the Drivers CD Edit install bat Confirm the Directory Paths of WINDOWS NT installation Edit uninst bat Confirm the Directory Paths For installing the driver Double click on install bat or run
22. imme J ome 10MF OME ov 33V AN 25PIN D FEMALE T T ESA PVTLTD BANGALORE Title c13 c17 c12 ESA PCIDIOT LE ME Bize Document Number ev Date Friday January 27 2006 Eheet 202 ESA PCIDIOT User Manual Page 52 of 60 Appendix B Component Layout jates Pvt Ltd 2 olore edis Electro Syttams Asso CX PCI 9052 40 30 eco i in KX 3 C4 COD 2 5 UB QU 20 mA c eS e 0 3 o st e ce o c x un Lal ESA PCIDIOT User Manual Page 53 of 60 Appendix C Connector Details 15 Pin D Type Female Connector for 8254 Timer J1 Signal 15 Pin Female Connector OUT 0 1 GATE 0 2 SYSCLK 4 3 SYSCLK 8 4 SYSCLK 16 5 EXTCLK 0 6 EXTCLK1 7 EXTCLK 2 8 NC 9 NC 10 GND 11 OUT2 12 GATE 2 13 OUT1 14 GATE 1 15 ESA PCIDIOT User Manual Page 54 of 60 26 Pin Right Header Box Connector J2 Signal 8255 26 PIN Connector U6 J2 P1A0 4 21 P1A1 3 22 P1A2 2 19 P1A3 1 20 P1A4 40 17 P1A5 39 18 P1A6 38 15 P1A7 97 16 P1BO 18 13 P1B1 19 14 P1B2 20 11 P1B3 21 12 P1B4 22 9 P1B5 23 10 P1B6 24 7 P1B7 25 8 P1CO0 14 5 P1C1 15 6 P1C2 16 3 P1C3 17 4 P1C4 13 1 P1C5 12 2 P1C6 11 23 P1C7 10 24 VCC 26 25 GND 7 26 ESA PCIDIOT User Manual Page 55 of 60 26 Pin Right Header Box Connector J4
23. intf PortA Good More Examples was given in the ESA PCIDIOT Drivers CD MASM Examples are also given in the CD ESA PCIDIOT User Manual Page 49 of 60 5 5 MASM32 Application Development Copy files from MASM32LIB folder to current working directory Include esadiot inc to your application Write the application using the libraries included in esadiot inc Please refer the examples given in MASM32 folder of Driver CD Makeit bat contains the assembler and linker commands 5 6 JAVA Application Development Copy all files from java folder to current working directory Create object for EsaJDiot class in your application Write the application using the methods available in EsaJDiot class For methods please refer EsaJDiot java Compile code using javac and run using java commands Please refer the examples given in java folder of Driver CD Known Limitations Cannot be used with Applets Application may not work in Cross Operating system Linux solaris ESA PCIDIOT User Manual Page 50 of 60 Vee Dj ADO O35 AD O35 AD2 LI787 A03 apa O33 aps ij ape DIS AD7 O37 AD8 DI ADS DI AD10 D ADI Doe AD12 O37 AD13 Oy AD14 oy avis OF AD16 DB A017 O g AD18 O H AD19 Dj AD20 DI Ap21 DJ avez Hg AD23 ORE Ap24 CHE AD25 Cer AD26 Hgg AD27 C435 AD28 HET AD29 dig AD30 AD31 piso 3d c BEo 159 C BE1 1589 C BE2 C BE3 BL OSEL Dig PAR CLK ELEN
24. on to thetimer Power Supply The card draws power from the system itself No external Power Supply required System Any PC compatible system with PCI slots ESA PCIDIOT User Manual Page 2 of 60 Block Diagram Ext Hardware Stepper Motor A D Converters PCI Slot Digital I O End User ESA PCIDIOT P C ESA PCIDIOT User Manual Page 3 of 60 2 0 DESCRIPTION OF THE CIRCUIT The card uses a popular PCI Bridge U8 to interface two 8255s at U5 amp U6 and one 8254 at U3 to the PC through PCI Bus The two 8255s provide six programmable 8 bit I O ports The 24 I O lines of U5 8255 Il are brought to J4 a 26 pin male connector and also to J3 a 25 pin D type connector site The 24 I O lines of U6 8255 1 are brought to J2 a 26 pin male connector The 74LS245 at U9 is a Bi directional buffer for data bus The PIT 8254 at U3 has three 16 bit programmable timers counters and can operate up to 8 MHz The OUT GATE and CLK lines of the PIT are brought to J1 a 15 pin D Type female Connector Please refer to Appendix C for all connector details The jumpers JP1 JP2 and JP3 are used for connecting external or system clock to the clock input of timer of 8254 JUMPER CONNECTION CLOCK USED 1 2 EXT CLOCK to Timer 2 JP1 2 3 SYS CLOCK to Timer2 1 2 EXT CLOCK to Timer1 JP2 2 3 SYS CLOCK to Timer1 1 2 EXT CLOCK to TimerO JP3 2 3 SYS CLOCK to TimerO NOTE The GATEO GATE1 GATE2 signals of the
25. river can then execute your I O instructions The problem with this is that it assumes you have the source code to make such a change For this user has to use the drivers given along with ESA PCIDIOT card under Lib folder User has to use Microsoft Visual Studio or Labwindows Cvi to use these libraries Procedure to develop the applications with these libraries and library description was given in the User Manual Example application sources are also available with the CD Another possible alternative is to modify the I O permission bitmap to allow a particular task access to certain I O ports This grants your user mode program running in ring 3 to do unrestricted I O operations on selected ports as per the I O permission bitmap This method is not really recommended but provides a means of allowing existing applications to run under windows NT 2000 XP Using the device driver provided with ESA PCIDIOT hardware is the preferred method For this 1 User has to copy the files given under MASM TC folder in ESA PCIDIOT Drivers CD to the current working directory 2 Run Chkdiot utility which was given in Drivers CD to know the base address assigned for the Card Resources 3 Write the application with MASM using IN amp OUT instruction to access the card resources If you are using TURBO C use inport amp outport functions to access card resources ESA PCIDIOT User Manual Page 47 of 60 4 Generate the xxxxx
26. roject IIS Application Wizard Manager 4 SS Addin Activex Activex DHTML Document DII Document Exe Application mS m m S me rl 3 Select Standard EXE and click OK Button 4 copy esapdiot bas amp esapdiot dll to the current project directory 5 Add esapdiot bas module to the current project by right clicking on the project window gt add module option 6 Place the controls command button text boxes etc in the form 7 Use the Driver Libraries as per the application requirement 8 Build the Project 9 Run the application Example Source is given in the Driver software CD under ExampleApp Source Folder ESA PCIDIOT User Manual Page 43 of 60 5 3 Lab Windows CVI 6 0 Creating Project in Lab Windows CVI 6 0 1 Start the Lab Windows CVI 6 0 2 Create a new project in Lab Windows CVI 6 0 3 You should then see the following window El Untitled prj File Edit View Build Run Instrument Library Tools Window Options Help Name Lis col Date 4 Save the project 5 Copy all Files from the Lib Folder which are available on Drivers CD to the current Project Directory 6 Create a new uir file from File Menu 7 You should then see the following window ESA PCIDIOT User Manual Page 44 of 60 Ez Untitled1 uir 8 Right Click on the Panel and add the controls required Add callbacks to the controls 9 Create new C source file and write the code using driver librarie
27. rtA ESA PCIDIOT User Manual Page 24 of 60 15 Read 82552PortB PURPOSE Reads the data from the 8255 2 U5 PortB of ESA PCIDIOT Hardware PROTOTYPE unsigned char Read 82552PortB void PARAMETERS NONE RETURN VALUE Returns the data read from the 8255 2 U5 PortB of ESA PCIDIOT Hardware EXAMPLE Data Read 82552PortB ESA PCIDIOT User Manual Page 25 of 60 16 Read 82552PortC PURPOSE Reads the data from the 8255 2 U5 PortC of ESA PCIDIOT Hardware PROTOTYPE unsigned char Read 82552PortC void PARAMETERS NONE RETURN VALUE Returns the data read from the 8255 2 U5 PortC of ESA PCIDIOT Hardware EXAMPLE Data Read 82552PortC ESA PCIDIOT User Manual Page 26 of 60 17 Write 8254CR PURPOSE Writes the data to the 8254 U3 Command Register of ESA PCIDIOT Hardware PROTOTYPE void Write 8254CR unsigned char Data PARAMETERS Name Type Input Output Data unsigned char Input DESCRIPTION Name Description Data Used for specifying the data to be written RETURN VALUE NONE EXAMPLE Write 8254CR 0x80 ESA PCIDIOT User Manual Page 27 of 60 18 Latch Timer PURPOSE Reads the data from specified 8254 U3 timers on the fly of ESA PCIDIOT Hardware PROTOTYPE unsigned short Latch_Timer unsigned char Timerno PARAMETERS Name Type Input Output Timerno unsigned char Input 0 Timer 0 1 Timer 1 Bo xe Timer 2 RETURN
28. s 10 Add uir c amp lib files to the project from the Edit Menu 11 Build the Application 12 Run the Application Example Source is given in Drivers CD under ExampleApp Source Folder ESA PCIDIOT User Manual Page 45 of 60 5 4 DOS mode Application Development TURBO C amp MASM NOTE User can write applications using inportb amp outportb function with TURBO C Compiler or using IN amp OUT instruction with MASM under windows 98 Me amp 95 Under Windows NT 2000 XP the user mode application does not have the permissions of the I O ports Please refer this section to develop the applications under Windows NT 2000 XP A problem that plagues Windows NT 2000 and Windows XP is it s strict control over I O ports Unlike Windows 9x amp ME Windows NT 2000 XP will cause an exception Privileged Instruction if an attempt is made to access an IO port that a user mode program is not privileged to talk too Actually it s not Windows NT that does this but any 386 or higher processor running in protected mode Accessing I O Ports in protected mode is governed by two events The I O privilege level IOPL in the EFLAGS register and the I O permission bit map of a Task State Segment TSS Under Windows NT there are only two I O privilege levels used level 0 amp level 3 User mode programs will run in privilege level 3 while device drivers and the kernel will run in privilege level 0 commonly referred to as ring O
29. v Generate debug info Ignore all default libraries Reset I Link incrementally Generate mapfile Enable profiling Project Options nologo subsystem windows incremental yes pdb Debug temp pdb debug machine 385 out Debug temp exe pdbtype sept ESA PCIDIOT User Manual Page 38 of 60 13 Select Link Tab in the Dialog box 14 Specify Esapdiot lib at Object library modules Textbox 15 Click OK button 16 Build the Application From Build Menu 17 Run the Application Example include lt stdafx h gt include Esapdiot h int main void unsigned int dwError dwError ESAPCIDIOT_Open Write 82551CR 0x80 Write 82552CR 0x9b while kbhit Write 82551PortA 0x55 Write 82551PortB 0xAA Write 82551PortB OxFF if Read 82552PortA 0x55 printf r n PortA Good Else Printf r n PortA Bad if Read 82552PortB 0x55 printf r n PortB Good Else Printf r n PortB Bad if Read 82552PortC 0x55 printf r n PortC Good Else Printf r n PortC Bad ESAPCIDIOT Close return 0 ESA PCIDIOT User Manual Page 39 of 60 Creating a MFG Application Project in Visual C 6 0 1 Start the Microsoft Developer Studio 2 Choose New from the File Menu 3 Select Projects Tab You should then see the following Dialog Box New x Files Projects Workspaces Dther Documents eli ATL COM
30. xx exe file 5 Run iopm xxxxxxx exe 0xd800 0xdc00 Oxdf00 Enter key Ex Oxd800 Base Address for 8255 1 OxdcOO Base Address for 8255 2 OxdfOO Base Address for 8254 This could be done at the first run of the application From Next run onwards till the PC restart use can run his applications without iopm Le XXXXxxxx exe enter NOTE The above procedure should be followed when user is having Windows NT 2000 XP Operating System Under Windows 98 amp 95 user can run his applications developed with MASM or TURBO C without any problem 6 Run uninstall exe to uninstall Esalopm Service Creating Application in TURBOC 1 Run the Chkdiot utility from Drivers CD to know the ESA PCIDOT Card resources This utility lists the i 8255 1 amp 8255 2 Command Register PortA PortB amp PortC Address ii 8254 Timer Command Register TimerO Timer1 amp Timer2 Address iii Number of ESA PCIDIOT Cards Existing 2 Open the Turbo C editor and create a new file Use the listed addresses of the card resources with inportb amp outportb libraries which is available under dos h ESA PCIDIOT User Manual Page 48 of 60 EXAMPLE include lt stdio h gt include lt dos h gt void main void Make 8255 1 all port outports outportb 0xd803 0x80 Make 8255 2 all port imports outportb 0xdc03 0x9b while kbhit outportb 0xd800 0x55 if inportb Oxdc00 0x55 pr

Download Pdf Manuals

image

Related Search

Related Contents

90 Watt LED movinghead User manual  Hitachi CP-A52 User's Manual  過呼吸ユニット(ZE-740A)  2013, LA MIF TIENT LE CAP  manual de instalação Stûv 30  Notice St Valentin A5.qxp  MINOLTA Z1 Use and Maintenance Manual  RouterBOARD 411UAHR Quick Setup Guide and  DVDホームメイド完全ガイド  Quick Start Guide  

Copyright © All rights reserved.
Failed to retrieve file