background image

Manual PCI-DIO-24DH 

24

  
 

1st Read: 

Status byte 

 

2nd Read: 

Low byte of latched data 

 

3rd Read: 

High byte of latched data 

  
After any latching operation on a counter, the contents of its hold register must be read before any 
subsequent latches of that counter will have any effect. If a status latch command is issued before the 
hold register is read, then the first read will read the status, not the latched value. 
 

8254 Driver

 

 
A simple driver is provided to perform basic counter/timer operations on this card. Source code for the 
driver and a sample program showing how to use the functions are located in the DOS\CSAMPLES 
directory. The following functions are provided: 

Frequency Measure

 

 
The Frequency Measure function of the 8254 Counter Driver has the ability to measure an unknown 
frequency from 1KHz to 2MHz. This function requires as input the Base Address of the card. The 
unknown frequency is applied to the CLOCK IN pin of the card. The function will return the frequency as a 
long integer in Hz.  
  
 

long frequency_measure(unsigned BaseAddress); 

Event Counter

 

 
The Event Counter function has the ability to trace the number of events that have occurred. This function 
requires the Base Address and an additional parameter that identifies which features should be 
implemented on this call to the function. Each feature can be identified by its unique integer value. 
Multiple features can be run in a single call to the function by ORing the respective integer values 
together. Features will be executed in increasing integer order. The CLOCK IN pin of the card is the point 
of application for the incoming events. (Note: This function is limited by the input speed of the 8254 
counter, and slow signals are preferred. Further only 65,535 events are possible without a RESET.) The 
function returns the number of events (based on priority) or 0 for those features that do not specify a 
return value. 
  
 Features: 
  INITIALIZE 

1; 

initialize 

the 

counter 

  START 

 = 

2; 

begin 

counting 

 

 

SINCESTART  = 4; 

return the number of events since the start 

 

 

SINCELAST 

= 8; 

return the number of events since last check 

  STOP 

 = 

16; 

stop 

counting 

events 

 

 

RESET  

= 32;  reset number of events to 0 

 

 

 

unsigned event_counter(unsigned BaseAddress, int feature); 

 

Generate Frequency

 

 
The Generate Frequency function will generate a square wave (0 to +5V) with the desired frequency. The 
Base Address of the card as well as the frequency are required as input to the function. The counter can 
generate a frequency with a range of 1Hz to 250KHz. The square wave can be read on the CLOCK OUT 
pin of the card.  
  
 

void generatefrequency(unsigned BaseAddress, unsigned long frequency); 

  

Содержание PCI-DIO-24D

Страница 1: ...10623 Roselle Street San Diego CA 92121 858 550 9559 FAX 858 550 7322 contactus accesio com www accesio com MODELS PCI DIO 24D and PCI DIO 24H Digital I O Cards USER MANUAL FILE MPCI DIO 24DH G1q...

Страница 2: ...S nor the rights of others IBM PC PC XT and PC AT are registered trademarks of the International Business Machines Corporation Printed in USA Copyright 2001 2005 by ACCES I O Products Inc 10623 Rosell...

Страница 3: ...parts not excluded by warranty Warranty commences with equipment shipment Following Years Throughout your equipment s lifetime ACCES stands ready to provide on site or in plant service at reasonable...

Страница 4: ...ction Map version D 12 Figure 3 2 Option Selection Map version H 12 Chapter 4 Address Selection 13 Chapter 5 Software 14 Chapter 6 Programming 15 Table 6 1 Address Assignment Table 15 Table 6 2 Contro...

Страница 5: ...while I O connections to the H are via a 50 pin connector The cards are 4 8 inches long and may be installed in any 5V PCI bus slot in IBM and compatible personal computers These cards provide 24 bit...

Страница 6: ...3 of Port C if the IRQD jumper is installed and the INTSEL0 jumper is installed in the INT position When bit C3 goes high edge triggering an interrupt is requested For the H model card a rising edge...

Страница 7: ...MHz crystal controlled oscillator Active Count Edge Negative edge falling edge Min Clock Pulse Width 30 ns high 40 ns low Timer Range 16 bits x3 per i8254 Power Output Resettable 0 5A fused 5 VDC from...

Страница 8: ...Manual PCI DIO 24DH 8 Figure 1 1 Card D or H Block Diagram...

Страница 9: ...for usage of the various card options CD Software Installation The following instructions assume the CD ROM drive is drive D Please substitute the appropriate drive letter for your system as necessar...

Страница 10: ...nding on the operating system and automatically finish installing the drivers 9 Run PCIfind exe to complete installing the card into the registry for Windows only and to determine the assigned resourc...

Страница 11: ...er must be installed in EITHER the TST or the BEN position for the card to function Interrupt Mode Jumpers Place the Interrupt Select 0 jumper in the INT position to select the Digital I O interrupt p...

Страница 12: ...Manual PCI DIO 24DH 12 3 9 4 8 IRQD INT EXT IRQT INTEN INTSEL0 TST BEN Figure 3 1 Option Selection Map version D Figure 3 2 Option Selection Map version H...

Страница 13: ...cards and the respective IRQs if any allotted Alternatively some operating systems Windows95 98 2000 can be queried to determine which resources were assigned In these operating systems you can use ei...

Страница 14: ...tory as a tool for you to use in configuring jumpers on the card It is menu driven and provides pictures of the card on the computer monitor You make simple keystrokes to select functions The picture...

Страница 15: ...up 0 Read Write Base Address 2 PC Group 0 Read Write Base Address 3 Control byte Write Only Base Address 4 Unused Base Address 5 Unused Base Address 6 Unused Base Address 7 Unused Base Address 8 Unuse...

Страница 16: ...0 If your card has been modified for use in Mode 1 then there will be an Addenda sheet in the front of this manual These cards cannot be used in PPI Mode 2 because of byte nibble wide buffering Note...

Страница 17: ...oller is addressed If for example a control byte of hex 80 has been sent as previously described and the data to be output are correct and it is now desired to open the three groups then it is necessa...

Страница 18: ...in BASIC is provided as a guide to assist you in developing your working software In this example the card base address is 2D0 hex and the I O lines of group 0 are to be setup as follows Port A Input...

Страница 19: ...te to the card while the TST jumper is installed the PPI output buffers are disabled Thus when you desire to to change the mode you must first set the new mode and then enable the buffers Enabling the...

Страница 20: ...ount and starting the cycle over If a trigger occurs before the counter decrements to zero a new count is loaded This forms a retriggerable one shot In mode 1 a low output pulse is provided with a per...

Страница 21: ...e Read Counter A1 See description for Base 10 Write Read Base 12 Write Read Counter A2 See description for Base 10 Write Read Base 13 Write Counter Control Register The control byte specifies the coun...

Страница 22: ...1 M0 BCD SC0 SC1 These bits select the counter that the control byte is destined for SC1 SC0 Function 0 0 Program Counter 0 0 1 Program Counter 1 1 0 Program Counter 2 1 1 Read Write Cmd See section o...

Страница 23: ...is most generally used and is selected for each counter by setting the RW1 and RW0 bits to ones Subsequent read load operations must be performed in pairs in this sequence or the sequencing flip flop...

Страница 24: ...ditional parameter that identifies which features should be implemented on this call to the function Each feature can be identified by its unique integer value Multiple features can be run in a single...

Страница 25: ...s fall effectively one half the period The Base Address of the card is required as input to the function The signal should be applied to the CLOCK IN pin of the card Software latency will be affected...

Страница 26: ...I Gate 4 PC5 5 Counter A2 Freq Out 6 Port C Hi PC4 7 Counter B0 Freq in 8 PC3 9 Ctr B1 P W I Gate 10 PC2 11 Counter B2 Freq Out 12 PC1 13 Counter C0 Freq In 14 Port C Lo PC0 15 Ctr C1 P W I Gate 16 P...

Страница 27: ...rt C 7 Hi 3 Port B 7 22 Port C 6 Hi 4 Port B 6 23 Port C 5 Hi 5 Port B 5 24 Port C 4 Hi 6 Port B 4 25 Port C 3 Lo 7 Port B 3 26 Port C 2 Lo 8 Port B 2 27 Port C 1 Lo 9 Port B 1 28 Port C 0 Lo 10 Port...

Страница 28: ...anual or just want to give us some feedback please email us at manuals accesio com Please detail any errors you find and include your mailing address so that we can send you any manual updates 10623 R...

Отзывы: