Diamond Systems PR-Z32-EA-ST, PR-Z32-E-ST user manual Command Sequences, Counter

Page 60

20.3 Command Sequences

Diamond Systems provides driver software to control the counter/timers on Prometheus. The information here is intended as a guide for programmers writing their own code in place of the driver and also to give a better understanding of the counter/timer operation.

The counter control register is shown below.

Base + 15

Write

Counter/Timer Control Register

 

 

 

 

 

 

 

 

 

 

 

 

Bit No.

7

6

5

4

3

2

1

0

 

 

 

 

 

 

 

 

 

Name

CTRNO

LATCH

GTDIS

GTEN

CTDIS

CTEN

LOAD

CLR

 

 

 

 

 

 

 

 

 

To make a counter run (load and enable a counter)

1.Load the desired initial value into the counter.

2.If you want to use the gate function, enable the gate.

3.Enable the counter.

To read a counter

1.Latch the counter. The counter continues to operate.

2.Read the value from the data registers.

A counter may be enabled or disabled at any time. If disabled, the counter will ignore incoming clock edges.

The gating may be enabled or disabled at any time. When gating is disabled, the counter will count all incoming edges. When gating is enabled, if the gate is high the counter will count all incoming edges, and if the gate is low the counter will ignore incoming clock edges.

Loading and enabling a counter

For counter 0, three bytes are required to load a 24-bit value. For counter 1, two bytes are needed for a 16-bit value. The value is an unsigned integer.

a. Write the data to the counter:

Break the load value into 3 bytes, low, middle, and high (two bytes for counter 1). Then write the bytes to the data registers in any sequence.

Counter 0

Counter 1

outp(base+12,low);

outp(base+12,low);

outp(base+13,middle);

outp(base+13,high);

outp(base+14,high);

 

b. Load the counter:

 

Counter 0

Counter 1

outp(base+15,0x02);

outp(base+15,0x82);

c.Enable the gate if desired:

Counter 0

Counter 1

outp(base+15,0x10);

outp(base+15,0x90);

d. Enable the counter:

 

Counter 0

Counter 1

outp(base+15,0x04);

outp(base+15,0x84);

Prometheus CPU User Manual V1.44

Page 60

Image 60
Contents Prometheus Table of Contents 22.2 22.4Description CPUFeatures System FeaturesProcessor Section Counter/Timers Analog InputAnalog Output Digital I/OPrometheus Board Drawing Main I/O Connector J3 O HeadersCable a Cable BConnector Part Numbers COM1 COM4LPT1 IR RX, IR TXInput Power J11 Output Power J12 Ethernet J4USB J5 Auxiliary Serial Port Connector J15 Watchdog/Failsafe Features J6Floppy Drive J7 IDE Drive J8Data Acquisition I/O Connector J14 Model PR-Z32-EA only Signal Name Definition11 PC/104 Bus Connectors J2 PC/104 16-bit bus connector J1 PC/104 8-bit bus connectorJumper Configuration J10 System ConfigurationCmos RAM J6 Watchdog Timer & System Recovery System Features System ResourcesCPU Chip Selects Console Redirection to a Serial Port Watchdog Timer Failsafe Mode / Bios Recovery Backup BatterySystem Reset Flash MemoryBios Bios SettingsDOS Bios Download / Recovery Initial Setup Disk-On-Board Flash File StorageOperating System Formatting Known Limitations Life Cycle Management and CalculationsSystem I/O EthernetSerial Ports Parallel PortBooting to DOS From a Floppy Drive Installing an OS From a Floppy Drive onto a Flashdisk ModuleInstalling an OS from a Hard Disk onto a Flashdisk Module Data Acquisition Circuit Data Acquisition Circuitry I/O MAP Base AddressBase + Write Function Read Function LSBData Acquisition Circuit Register Map AD7 AD6 AD5 AD4 AD3 AD2 AD1 AD0Command Register Register Bit DefinitionsBase + Base + Read Value = Base + 0 value + Base + 1 valueBase + Write Not Used Read AD9 AD8Base + Read/Write Channel Register Base + Write Analog Input Gain Base + Read Analog Input Status STS Wait Dacbsy OVF ScanenBase + Read/Write Interrupt / DMA / Counter Control CKSEL1 CKFRQ1 CKFRQ0 Adclk Dmaen Tinte Dinte AinteBase + Read/Write Fifo Threshold FT5 FT4 FT3 FT2 FT1 FT0Base + Write DA7 DA6 DA5 DA4 DA3 DA2 DA1 DA0Base + Read Channel and Fifo Status FD5 FD4 FD3 FD2 FD1 FD0Base + Write DAC MSB + Channel No DACH1 DACH0DA9 DA8 Base + Read Analog Operation StatusBase + Read / Write Base + Read / Write Digital I/O Control RegisterDioctr Dira Dirch Dirb Dircl Dioctr =Base + Read/Write Counter/Timer D7 Base + Read/Write Counter/Timer D15Base + Read/Write Counter/Timer D23 Base + Write Counter/Timer Control Register Ctrno Latch Gtdis Gten Ctdis Cten Load CLRBase + Read Fpga Revision Code REV7 REV6 REV5 REV4 REV3 REV2 REV1 REV0Data Acquisition Circuit Configuration Analog Output Configuration Single-ended / Differential InputsUnipolar / Bipolar Inputs Analog Input Ranges and Resolution Input Range Resolution 1 LSBOverview Input Range SelectionPerforming AN A/D Conversion Perform an A/D conversion on the current channel LSB = inpbase MSB = inpbase+1Input voltage = A/D value / 32768 * Full-scale input range 15.A/D SCAN, INTERRUPT, and Fifo Operation Prometheus A/D Operating Modes LOW, HighAinte Scanen Analog Output Ranges and Resolution ResolutionDescription LSB = Output voltage range16.4 D/A Conversion Formulas and Tables REF 1 LSBConversion Formulas for Bipolar Output Ranges Generating AN Analog Output Analog Circuit Calibration 18.1 A/D bipolar offset18.2 A/D unipolar offset 18.3 A/D full-scaleDigital I/O Operation COUNTER/TIMER Operation Counter 0 A/D Sample ControlCounter 1 Counting/Totalizing Functions Command Sequences CounterCounter Outpbase+15,0x01 Outpbase+15,0x81 Data Acquisition Specifications Configuration Using the Flashdisk with Another IDE DrivePower Supply Flashdisk Module23. I/O Panel Board Panel Board I/O Connectors Panel Board Top Side / External Use I/O ConnectorsLocation Type Description USB aPanel Board Power Connections J12 pinout to/from DC/DC power supplyJ3 Pinout J9 Pinout Installation J5 USBFlash Disk Programmer Board 25.I/O Cables Photo No Cable No DescriptionCable Kit C-PRZ-KIT VGA Accessory Board PL5 pin no PL5 Signal J25 pin no J25 SignalPL5 pin no DB15F pin no Signal Prometheus Connector Manufacturer Manufacturer Part No Mounting Prometheus on a BaseboardLinks Website informationPage 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.