Skip to content

Commit

Permalink
Add READMEs
Browse files Browse the repository at this point in the history
  • Loading branch information
racerxdl committed Aug 9, 2020
1 parent ab9b04f commit ca09737
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 1 deletion.
17 changes: 17 additions & 0 deletions Hardware/sigrok-decoders/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Sigrok Decoders

Some [sigrok decorders](https://sigrok.org/wiki/Protocol_decoders)

* PCF8574
* HD44780 (Only 4 bit mode, expecting PCF8574 decoder output)


## How to install / use


Copy this folder content to:

* On Linux: `~/.local/share/libsigrokdecode/decoders`
* On Windows: `%ProgramData%\libsigrokdecode\decoders`

And then restart pulseview / sigrok
7 changes: 7 additions & 0 deletions Hardware/sigrok-decoders/hd44780/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# HD44780 LCD Decoder

The HD44780 is a LCD Controller

* Only works in 4 bit mode
* Expects a PCF8574 compatible output

2 changes: 1 addition & 1 deletion Hardware/sigrok-decoders/hd44780/pd.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class Decoder(srd.Decoder):
)
options = (
{'id': 'lcd_mode', 'desc': 'LCD Mode',
'default': '4bit', 'values': ('4bit', '8bit')},
'default': '4bit', 'values': ('4bit')},
)

def __init__(self):
Expand Down
27 changes: 27 additions & 0 deletions Hardware/sigrok-decoders/pcf8574/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# PCF8574 Decoder

The PCF8574 is a 8 bit I2C I/O Expander

It receives the input from sigrok i2c decoder and then outputs the raw data that has been written


It sends the data to next stack decoder like this:


```python
[
[ bitvalue, startsample, endsample ], # Repeats 8 times, one for each bit
]

# For example:
[
[1, 53636, 53656], # Bit 7
[0, 53616, 53636], # Bit 6
[0, 53596, 53616], # Bit 5
[1, 53576, 53596], # Bit 4
[0, 53556, 53576], # Bit 3
[0, 53536, 53556], # Bit 2
[0, 53516, 53536], # Bit 1
[1, 53496, 53516] # Bit 0
]
```

0 comments on commit ca09737

Please sign in to comment.