Diamond Systems PR-Z32-E-ST, PR-Z32-EA-ST COUNTER/TIMER Operation, Counter 0 A/D Sample Control

Page 59

20.COUNTER/TIMER OPERATION

Prometheus model PR-Z32-EA contains two counter/timers that provide various timing functions on the board for A/D timing and user functions. These counters are controlled with registers in the on-board data acquisition controller FPGA. See pages 38 and 43 for information on the counter/timer control register bits and how to perform various functions using these counters.

20.1 Counter 0 – A/D Sample Control

The first counter, Counter 0, is a 24-bit “divide-by-n” counter used for controlling A/D sampling. The counter has a clock input, a gate input, and an output. The input is a 10MHz or 1MHz clock provided on the board and selected with bit CKFRQ0 in Base + 4 bit 5. The gate is an optional signal that can be input on pin 21 of the I/O header J14 when DIOCTR (Base + 11 bit 7) is 1. If this signal is not used then the counter runs freely. The output is a positive pulse whose frequency is equal to the input clock divided by the 24-bit divisor programmed into the counter. The output appears on pin 24 of the I/O header when DIOCTR=1.

The counter operates by counting down from the programmed divisor value. When it reaches zero, it outputs a positive-going pulse equal to one input clock period (100ns or 1s, depending on the input clock selected by CKFRQ0). It then reloads to the initial load value and repeats the process indefinitely.

The output frequency can range from 5MHz (10MHz clock, divisor = 2) down to 0.06Hz (1MHz clock divided by 16,777,215, or 224-1). The output is fed into the A/D timing circuit and can be selected to trigger A/D conversions when AINTE is 1 and ADCLK is 0 in Base + 4. Using the control register at Base + 15 the counter can be loaded, cleared, enabled, and disabled, the optional gate can be enabled and disabled, and the counter value can be latched for reading.

20.2 Counter 1 – Counting/Totalizing Functions

The second counter, Counter 1, is similar to Counter 0 except it is a 16-bit counter. It also has an input, a gate, and an output. These signals may be user-provided on the I/O header when DIOCTR=0 or the input may come from the on-board clock generator. When the on-board clock generator is used, the clock frequency is either 10MHz or 100KHz as determined by control bit CKFRQ1 in Base + 4.

The output is a positive-going pulse that appears on pin 26 of the I/O header. The output pulse occurs when the counter reaches zero. When the counter reaches zero it will reload and start over on the next clock pulse. The output stays high the entire time the counter is at zero, i.e. from the input pulse that causes the counter to reach zero until the input pulse that causes the counter to reload.

When DIOCTR=0, Counter 1 operates as follows: It counts positive edges of the signal on pin 23 on the I/O header. The gate is provided on pin 22. If it is high then the counter will count, and if it is low the counter will hold its value and ignore input pulses. This pin has a pull-up so the counter can operate without any external gate signal.

NOTE: When counting external pulses, Counter 1 will only update its read register every 4th pulse. This behavior is due to the synchronous design of the counter having to contend with the asynchronous input pulses. The count register contents are correct on the 4th pulse but will remain static until 4 more pulses occur on the input.

When DIOCTR=1, Counter 1 operates as follows: It takes its input from the on-board clock generator based on the value of the CKFRQ1 bit in Base + 4. There is no gating and the counter runs continuously.

Counter 1 may be used as either a pulse generator or a totalizer/counter. In pulse generator mode the output signal on pin 26 is of interest. In totalizer/counter mode the counter value is of interest and may be read by first latching the value and then reading it.

Prometheus CPU User Manual V1.44

Page 59

Image 59
Contents Prometheus Table of Contents 22.4 22.2CPU DescriptionProcessor Section FeaturesSystem Features Digital I/O Counter/TimersAnalog Input Analog OutputPrometheus Board Drawing Cable B Main I/O Connector J3O Headers Cable aIR RX, IR TX Connector Part NumbersCOM1 COM4 LPT1Input Power J11 USB J5 Output Power J12Ethernet J4 Watchdog/Failsafe Features J6 Auxiliary Serial Port Connector J15IDE Drive J8 Floppy Drive J7Signal Name Definition Data Acquisition I/O Connector J14 Model PR-Z32-EA onlyJ2 PC/104 16-bit bus connector J1 PC/104 8-bit bus connector 11 PC/104 Bus ConnectorsCmos RAM Jumper ConfigurationJ10 System Configuration J6 Watchdog Timer & System Recovery CPU Chip Selects System FeaturesSystem Resources Console Redirection to a Serial Port Watchdog Timer Flash Memory Failsafe Mode / Bios RecoveryBackup Battery System ResetDOS BiosBios Settings Bios Download / Recovery Operating System Formatting Initial SetupDisk-On-Board Flash File Storage Life Cycle Management and Calculations Known LimitationsEthernet System I/OParallel Port Serial PortsInstalling an OS From a Floppy Drive onto a Flashdisk Module Booting to DOS From a Floppy DriveInstalling an OS from a Hard Disk onto a Flashdisk Module Data Acquisition Circuit LSB Data Acquisition Circuitry I/O MAPBase Address Base + Write Function Read FunctionAD7 AD6 AD5 AD4 AD3 AD2 AD1 AD0 Data Acquisition Circuit Register MapBase + Command RegisterRegister Bit Definitions AD9 AD8 Base + ReadValue = Base + 0 value + Base + 1 value Base + Write Not Used ReadBase + Read/Write Channel Register Base + Write Analog Input Gain STS Wait Dacbsy OVF Scanen Base + Read Analog Input StatusFT5 FT4 FT3 FT2 FT1 FT0 Base + Read/Write Interrupt / DMA / Counter ControlCKSEL1 CKFRQ1 CKFRQ0 Adclk Dmaen Tinte Dinte Ainte Base + Read/Write Fifo ThresholdFD5 FD4 FD3 FD2 FD1 FD0 Base + WriteDA7 DA6 DA5 DA4 DA3 DA2 DA1 DA0 Base + Read Channel and Fifo StatusBase + Read Analog Operation Status Base + Write DAC MSB + Channel NoDACH1 DACH0 DA9 DA8Dioctr = Base + Read / WriteBase + Read / Write Digital I/O Control Register Dioctr Dira Dirch Dirb DirclBase + Read/Write Counter/Timer D23 Base + Read/Write Counter/Timer D7Base + Read/Write Counter/Timer D15 Ctrno Latch Gtdis Gten Ctdis Cten Load CLR Base + Write Counter/Timer Control RegisterREV7 REV6 REV5 REV4 REV3 REV2 REV1 REV0 Base + Read Fpga Revision CodeData Acquisition Circuit Configuration Unipolar / Bipolar Inputs Analog Output ConfigurationSingle-ended / Differential Inputs Input Range Selection Analog Input Ranges and ResolutionInput Range Resolution 1 LSB OverviewPerforming AN A/D Conversion LSB = inpbase MSB = inpbase+1 Perform an A/D conversion on the current channelInput voltage = A/D value / 32768 * Full-scale input range 15.A/D SCAN, INTERRUPT, and Fifo Operation Ainte Scanen Prometheus A/D Operating ModesLOW, High LSB = Output voltage range Analog Output Ranges and ResolutionResolution DescriptionREF 1 LSB 16.4 D/A Conversion Formulas and TablesConversion Formulas for Bipolar Output Ranges Generating AN Analog Output 18.3 A/D full-scale Analog Circuit Calibration18.1 A/D bipolar offset 18.2 A/D unipolar offsetDigital I/O Operation Counter 1 Counting/Totalizing Functions COUNTER/TIMER OperationCounter 0 A/D Sample Control Counter Command SequencesCounter Outpbase+15,0x01 Outpbase+15,0x81 Data Acquisition Specifications Flashdisk Module ConfigurationUsing the Flashdisk with Another IDE Drive Power Supply23. I/O Panel Board USB a Panel Board I/O ConnectorsPanel Board Top Side / External Use I/O Connectors Location Type DescriptionJ12 pinout to/from DC/DC power supply Panel Board Power ConnectionsJ3 Pinout J5 USB J9 Pinout InstallationFlash Disk Programmer Board Cable Kit C-PRZ-KIT 25.I/O CablesPhoto No Cable No Description PL5 pin no DB15F pin no Signal VGA Accessory BoardPL5 pin no PL5 Signal J25 pin no J25 Signal Website information Prometheus Connector Manufacturer Manufacturer Part NoMounting Prometheus on a Baseboard LinksPage 28.PC/104 Mechanical Drawing

PR-Z32-E-ST, PR-Z32-EA-ST specifications

The Diamond Systems PR-Z32-EA-ST and PR-Z32-E-ST are pioneering solutions in the realm of embedded computing systems, designed to meet the challenging demands of various industrial applications. These boards harness advanced technologies and a comprehensive feature set to ensure exceptional performance, flexibility, and reliability.

At the heart of the PR-Z32 series is a robust processor architecture that combines efficiency with processing power. The systems are built around the Zynq-7000 SoC (System on Chip), which integrates a dual-core ARM Cortex-A9 processor with Xilinx FPGA technology. This hybrid architecture provides the ability to run complex algorithms and custom logic concurrently, making the boards ideal for applications requiring intense computational tasks such as image processing, data acquisition, and real-time control.

One of the main features of the PR-Z32-EA-ST and PR-Z32-E-ST is their versatility. Both variants support a wide range of I/O options, including USB, Ethernet, CAN, and serial interfaces. This range of connectivity allows for integrations with various sensors, actuators, and other peripheral devices, making it suitable for industrial automation, robotics, and IoT projects. The inclusion of multiple GPIO pins also enhances the capability of the boards to interface with additional hardware.

In terms of performance, the PR-Z32 series supports substantial amounts of on-board memory, which can be essential for applications requiring the storage and processing of large datasets. The configurations are often customizable, allowing users to select the appropriate amount of RAM and on-board flash memory for their specific applications.

Reliability is a critical characteristic of the Diamond Systems PR-Z32 series. The boards are built to withstand adverse environmental conditions, making them suitable for deployment in industrial environments. They are often designed to operate over a wide temperature range, ensuring functionality in both hot and cold climates. Additionally, the boards are compliant with various industry standards, assuring users of their robustness and durability.

Moreover, the PR-Z32-EA-ST and PR-Z32-E-ST support real-time operating systems (RTOS) and conventional operating systems such as Linux. This support provides developers with the flexibility to choose the best environment for their applications, whether they require real-time performance or full-fledged operating system features.

In conclusion, the Diamond Systems PR-Z32-EA-ST and PR-Z32-E-ST are formidable options for those seeking powerful, versatile, and reliable embedded computing solutions. With their advanced SoC architecture, flexible I/O options, extensive memory configurations, and environmental resilience, these boards are well-equipped to tackle the challenges of modern industrial applications.