Microsoft UNO-3074 user manual Onboard Isolated Counter/Timer, Counter/Timer Control Register

Page 34

2.7 Onboard Isolated Counter/Timer

The UNO-3074 uses one 82C54 programmable timer/counter chip that includes three independent 16-bit down counters: counter 0, counter 1 and counter 2. Counter 0 and counter 1 are for users, and counter 2 is specified for the system and can’t be used by user. Each counter has clock input, gate input and pulse output. They can be programmed to count from 2 up to 65535 or cascaded into one 32-bit counter.

The UNO-3074 has two isolated counter input channels designated DI1 and DI3 with two isolated output channels designated DO2 and DO3. Therefore, you can set each counter of 82C54 as counter function or timer function.

2.7.1 Counter/Timer Control Register

The Counter/Timer Control Register controls the function and status of each counter/timer signal source. Table 2.11 shows the bit map of the Counter/Timer Control Register. The register is readable/writable register. While being written, it is used as a control register; and while being read, it is used as a status register.

Table 2.11: Counter/Timer Control Register Bit Map

Base

 

7

6

5

4

3

2

1

0

Address

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

207H

R/W

Interrupt

Flag/Clear Register

 

 

 

 

 

 

 

 

 

 

CTR1F

CTR0F

 

 

208H

R/W

82C54

Chip Counter0 Register

 

 

 

 

 

 

 

 

 

 

 

 

 

 

209H

R/W

82C54

Chip Counter1 Register

 

 

 

 

 

 

 

 

 

 

 

 

 

 

20BH

R/W

82C54

Chip Control Register

 

 

 

 

 

 

 

 

 

 

 

 

 

 

20CH

R/W

Counter0

Start

Control /

Output Status Register

 

 

 

 

 

 

 

CTR0

 

 

 

CTR0

 

 

 

 

 

Out

 

 

 

Gate

20DH

R/W

Counter1

Start

Control /

Output Status Register

 

 

 

 

 

 

 

CTR1

 

 

 

CTR1

 

 

 

 

 

Out

 

 

 

Gate

20EH

R/W

Counter0

Setting

Register

 

 

 

 

 

 

 

 

 

 

CTR0

CTR0

CTR0

CTR0

 

 

 

 

 

 

IntSet

OutSet

GateSet

CLKSet

20FH

R/W

Counter1

Setting

Register

 

 

 

 

 

 

 

CTR3

S1

S0

CTR1

CTR1

CTR1

CTR1

 

 

 

2Set

 

 

IntSet

OutSet

GateSet

CLKSet

UNO-3074 User Manual

24

Image 34
Contents UNO-3074 Acknowledgements CopyrightSupport Product Warranty 2 years Declaration of Conformity FCC Class a Technical Support and AssistanceSafety Instructions Safety Precaution Static Electricity Contents Chapter Initial Setup Appendix Programming the Watchdog Timer Page Overview Introduction Open Architecture Designed for AutomationOff-the-shelf Universal PCI Extensions Front Access ConnectionsAn Industry-Proven Design Designed to Fit Into Control CabinetsFlexible Networking Options Onboard DI/O for Counter, Alarm/Event HandlingPopular Operating Systems and Rapid Application Development CPU Hardware SpecificationsBattery Backup RAM 512 KB Chipset RS-232 SpeedCh Isolated Digital Output DO0~DO3 Two 16-bit Counters/TimersCh Isolated Digital Input DI0~DI3 Anti-ShockPower Consumption 24 W Typical Safety PrecautionsPower Supply 16 ~ 36 VDC Chassis Size WxHxDChassis Dimensions Chassis Dimensions for CeleronM 1GHzChassis for Pentium 1.8GHz or Faster CPU Accessories Packing ListHardware Functionality Front Panel of UNO-3074 1 16C550 UARTs with 16-byte Fifo Standard RS-232 Interface COM1~COM2RS-232/422/485 Interface COM3~COM4 2 RS-422/485 Detection4 RS-232/422/485 Selection 5 RS-485 Auto Flow/RS-422 Master/Slave SelectionAuto Flow & RS-422 Slave/Masters 6 IRQ, I/O Address and Transmission Rate SettingVector address for share IRQ 1D0H IRQ Setting via Switch 1 at SW3 Transmission Rate Switch 2 at SW3Termination Resistor JP6 LAN Ethernet ConnectorOnboard Isolated Digital Input Pin AssignmentsDigital Input Connector Signal Description Isolated InputsInterrupt Control Register Interrupt Function of the DI SignalsIRQ Level Interrupt Control Register Bit MapInterrupt Triggering Edge Control Interrupt Enable Control FunctionInterrupt Flag Bit Digital Output Connector Signals Onboard Isolated Digital Output10 Digital Output Power On Configuration Power On ConfigurationIsolated Outputs Isolated Digital Output Connection Counter/Timer Control Register Onboard Isolated Counter/Timer11 Counter/Timer Control Register Bit Map Counter 0 Function Block Counter 1 Function BlockCounter Internal Clock 4 32-bit Counter Function Block CTR32Set=1Counter Clock Source Counter Gate Source14 Counter Gate Source Control Bit Counter Output DestinationCounter Interrupt Flag 15 Counter Output Destination Control BitCascaded 32-bit Counter Power Input17 32-bit Counter Control Bit 12 LED Locations to Monitor Power Input 18 Power Register Bit Map LED and Buzzer for System Diagnosis19 LED & Buzzer Control Register 20 Programmable LED Control BitPcmcia PC Card Slot USB ConnectorPS/2 Keyboard and Mouse Connector 21 Programmable Buzzer Control BitPage Make sure the IRQ of Pcmcia device is VGA Display Connector Page Battery Backup Sram 14 LED Location for Battery BackupLithium Battery Specification Reset ButtonOutput voltage 3 VDC Initial Setup JP2 on mainboard refer to Figures A.3 Connecting PowerInserting a CompactFlash Card JP1 on daughterboard refer to Figure A.4Installing a Hard Disk Correct way is shown by the first figure belowPage Page Page IDE Connector CN1 and CN2 Installing a PCI-bus Card 1st Anti-Vibration Rubber2nd PCI-bus Card Installation Installing Power Cable Mounting UNO-3074UNO-3074 Improper Installation UNO-3074 Mounting CautionUNO-3074 Correct Installation Bios Setup and System Assignments Page System Settings and Pin Assignments System I/O Address and Interrupt Assignments Table A.1 UNO-3074 System I/O PortTable A.2 UNO-3074 Interrupt Assignments Interrupt No Interrupt SourceBoard Connectors and Jumpers Figure A.1 Backplane Connector & JumpersFigure A.3 Mainboard Connector & Jumpers Front Figure A.4 Daughter Connector & Jumpers Front Figure A.5 Daughter Connector & Jumpers Back Table A.3 Connector and Jumper Descriptions Table A.4 Connector and Jumper DescriptionsTable A.5 Connector & Jumper Descriptions SW1UNO-3074 Control Register Table A.6 UNO-3074 Control RegisterRS-232 Standard Serial Port COM1~COM2 Table A.7 RS-232 Serial Port Pin AssignsRS-232/422/485 Serial Port COM3~COM4 Ethernet RJ-45 Connector LAN1~LAN2Table A.9 Ethernet RJ-45 Connector Pin Assigns Table A.8 RS-232/422/485 Serial Port Pin AssignsPower Screw Terminal PWR Table A.10 Power Connector Pin AssignmentsTable A.11 Keyboard & Mouse Connector Pins PS/2 Keyboard and Mouse ConnectorUSB Connector USB1~USB4 Table A.12 USB Connector Pin AssignmentsTable A.13 VGA Adaptor Cable Pin Assignmen Page Programming the Watchdog Timer Appendix B Programming the Watchdog Timer