Copyright | (c) Levent Erkok |
---|---|
License | BSD3 |
Maintainer | erkokl@gmail.com |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Abstractions for shift-register IC parts.
- class ShiftRegister a where
- data SR_74HC595 = SR_74HC595 {}
Shift register abstraction
class ShiftRegister a where Source
A shift-register class as supported by the hArduino library.
Capacity
Display name
dataSheet :: a -> String Source
Data sheet (typically a URL)
initialize :: a -> Arduino () Source
Initialize the shift-register
disable :: a -> Arduino () Source
Disable the output, putting it into high-impedance state
enable :: a -> Arduino () Source
Enable the output, getting it out of the high-impedance state
clear :: a -> Arduino () Source
Clear the contents
push :: a -> Bool -> Arduino () Source
Push a single bit down the shift-register
store :: a -> Arduino () Source
Store the pushed-in values in the storage register
read :: a -> Arduino [Bool] Source
Read the current value stored
Supported shift-registers
Texas Instruments 7HC595
data SR_74HC595 Source
The Texas-Instruments 74HC595 8-bit shift register with 3-state outputs. Data sheet: http://www.ti.com/lit/ds/symlink/sn74hc595.pdf.
This is a versatile 8-bit shift-register with separate serial and register clocks, allowing shifting to be done while the output remains untouched. We model all control pins provided. Note that the enable and clear lines are negated.
SR_74HC595 | |
|