|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dioscuri.module.pit.Counter
public class Counter
A single counter of the PIT based on the Intel 82C54 chipset.
This counter works following the convention rules of the PIT: 1. For each counter, the control word must be written before the initial count is written. 2. The initial count must follow the count format specified in the Control Word (LSB, MSB, etc.)
Field Summary | |
---|---|
protected boolean |
bcd
|
protected byte[] |
ce
|
protected int |
counterMode
|
protected byte[] |
cr
|
protected static int |
LSB
|
protected static int |
MSB
|
protected byte[] |
ol
|
protected boolean |
readBackCmd
|
protected int |
rwMode
|
Constructor Summary | |
---|---|
Counter(PIT pit,
int counterNumber)
Constructor of the counter class |
Method Summary | |
---|---|
void |
clockPulse()
Performs counter action on one clockpulse. |
protected boolean |
getBCD()
Return if this counter is in BCD mode |
protected int |
getCounterNumber()
Return the counter number (ID) |
protected byte |
getCounterValue()
Returns the counter value depending on the R/W mode |
protected boolean |
getGateSignal()
Retrieves the GATE signal |
protected boolean |
getOutSignal()
Retrieves the OUT signal |
protected boolean |
getParity()
Return the parity of the count value |
protected boolean |
isEnabled()
Return if this counter has been enabled |
protected void |
latchCounter()
Latch this counter (read back current count value) Note: this function only works if the counter is in latchmode. |
protected void |
setCounterMode(int mode)
Set counter mode |
protected void |
setCounterValue(byte data)
Set counter value depending on the R/W mode Note: it is assumed that data is always loaded in LSB, MSB order. |
protected void |
setEnabled(boolean status)
Enable/disable the counter |
protected void |
setGateSignal(boolean status)
Sets the GATE signal to given status GATE signal is compared with its previous state. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int counterMode
protected int rwMode
protected boolean bcd
protected byte[] ce
protected byte[] cr
protected byte[] ol
protected boolean readBackCmd
protected static final int LSB
protected static final int MSB
Constructor Detail |
---|
public Counter(PIT pit, int counterNumber)
pit
- counterNumber
- Method Detail |
---|
public void clockPulse()
protected boolean getGateSignal()
protected void setGateSignal(boolean status)
status
- protected boolean getOutSignal()
protected byte getCounterValue()
protected void setCounterValue(byte data)
data
- protected void setCounterMode(int mode)
mode
- protected void latchCounter()
protected boolean getParity()
protected boolean getBCD()
protected void setEnabled(boolean status)
status
- protected boolean isEnabled()
protected int getCounterNumber()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |