Skip to content

Commit c401741

Browse files
authored
Improved differential amplifier library documentation
1 parent b64b6cd commit c401741

File tree

1 file changed

+25
-12
lines changed

1 file changed

+25
-12
lines changed

docs/differential-amplifier/readme.md

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,31 +15,44 @@ int invalid_output = analogDiffRead(A0, A5, GAIN_8);
1515

1616
| -\\+ | A0 | A1 | A2 | A3 | A4 | A5 | A6 | A7 | A8 | A9 |
1717
| ---- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
18-
| A0 | || | | | | | | | |
19-
| A1 || | | | | | | | | |
20-
| A2 ||| ||||||||
21-
| A3 |||| |||||||
22-
| A4 ||| | | | | | | | |
23-
| A5 ||| | | | | | | | |
24-
| A6 ||| | | | | | | | |
25-
| A7 ||| | | | | | | | |
26-
| A8 ||||||||| ||
27-
| A9 |||||||||| |
18+
| A0 | - || | | | | | | | |
19+
| A1 || - | | | | | | | | |
20+
| A2 ||| - ||||||||
21+
| A3 |||| - |||||||
22+
| A4 ||| | | - | | | | | |
23+
| A5 ||| | | | - | | | | |
24+
| A6 ||| | | | | - | | | |
25+
| A7 ||| | | | | | - | | |
26+
| A8 ||||||||| - ||
27+
| A9 |||||||||| - |
2828

2929
Also see the examples in the `differential_amplifier` library provided with this core.
3030

3131
## How does it work?
3232

3333
### Basics
3434

35-
The differential amplifier (DAP) has 2 inputs (`inverting`/minus and `non-inverting`/plus), a `gain` value and 1 `output`.
35+
The differential amplifier (DAP) consists of
36+
37+
* `inverting` input (-)
38+
* `non_inverting` input (+)
39+
* `gain` value
40+
* `output`.
41+
42+
where
3643

3744
```
38-
output = gain * (non-inverting - inverting)
45+
output = gain * (non_inverting - inverting)
3946
```
4047

4148
And the output can be read through the ADC (like a normal analog read).
4249

50+
### Limitations
51+
52+
Both inputs and output must be between gnd and vcc.
53+
54+
### Datasheet
55+
4356
All information was extracted from this translation of the datasheet: [(English) LGT8FX8P_databook_V1.04](../LGT8FX8P_databook_v1.0.4.en.pdf) (thanks to [metallurge](https://github.com/metallurge) for the translated doc [here](https://github.com/RalphBacon/LGT8F328P-Arduino-Clone-Chip-ATMega328P/issues/2#issuecomment-517952757))
4457

4558
<img src="Diagram.png" alt="ADC Structure chart. Page 232" />

0 commit comments

Comments
 (0)