![VersaLogic EBX-22 Reference Manual Download Page 72](http://html1.mh-extra.com/html/versalogic/ebx-22/ebx-22_reference-manual_1006801072.webp)
Interfaces and Connectors
EBX-22 Reference Manual
66
PWM Outputs and TACH Inputs
The EBX-22 incorporates three pulse width modulation (PWM) outputs and three tachometer
(TACH) inputs which can be used, in a limited fashion, as general purpose frequency generators
and counter/timers.
The PWM output frequency options are: 11.0 Hz, 14.6 Hz, 21.9 Hz, 29.3 Hz, 35.2 Hz, 44.0 Hz,
58.6 Hz, 87.7 Hz, 15 kHz, 20 kHz, 25 kHz, and 30 kHz. The PWM duty cycle is user definable
from 0% (1/256) to 100% (255/256) and also invertible.
The SCH3114 Super I/O chip includes a fan speed monitoring feature, which uses TACH inputs.
When the TACHs are set to manual mode, the inputs can be used as counter/timers instead of for
fan speed monitoring. By default, the 16-bit tachometer registers hold the number of 90 kHz
pulses that occur within five tachometer input edge-transitions (for example, two TACH pulses).
In manual mode, the tachometer circuit begins monitoring the TACH inputs on the 1st edge
detected and continues counting until the last edge is detected. If the counter overflows before the
number of edges is detected, it sets the count to FFFFh. If no edges are detected, a “stalled-fan
event” occurs and the counter is set to FFFFh.
Refer to the
for more information and detailed register
descriptions.
E
XTERNAL
C
ONNECTIONS
Table 34: TAC and PWM Pinout
J15
Pin
Signal
CBR-4004
Connector
CBR-4004
Pin (Signal)
1 TAC_IN
1
J1
5 (IO1)
2 TAC_IN
2
TAC Input
4 (IO2)
3 TAC_IN
3
Purpose I/O
3 (IO3)
4 PLD_CLK
2
(IO4)
5 GND
1
(GND1)
6 PWM_OUT1
J2
5 (IO5)
7 PWM_OUT2
PWM Output
4 (IO6)
8 PWM_OUT3
3
(IO7)
9 NC
2
(IO8)
10 GND
1
(GND1)
PWM
O
UTPUT AND
T
ACH
I
NPUT
C
ODE
E
XAMPLE
The following code provides guidelines for using PWM outputs and tachometer inputs as general
purpose timers. Some steps are designated as required, but all steps are recommended.
;Controlling PWM outputs manually
;Pause the SCH3114 Hardware Monitor (optional)
MOV DX, C70h ;Hardware Monitor index port
MOV AL, 40h ;Ready,Lock,Start Register
OUT DX, AL
MOV DX, C71h ;Hardware Monitor data port
IN AL, DX ;Read Current Value
AND AL, FEh ;Disable Start bit
OUT DX, AL
;Set PWMs to manual mode (required)
StockCheck.com