@@ -21,29 +21,42 @@ Arduino library for DS1804 Nonvolatile Trimmer Potentiometer.
2121The library implements a class for the DS1804 potentiometer.
2222These devices come in 10K, 50K and 100K and allows control in 100 steps.
2323
24- The DS1804 has a simple pulse interface and cannot be read back
25- so the library cannot provide the current position of the wiper.
24+ The DS1804 has a simple pulse interface and can ** not ** be read back
25+ so the library can not provide the current position of the wiper.
2626
2727The DS1804 has an EEPROM to save the current position (writeable for 50000 times)
28- and uses that as start position at power up.
28+ and uses that value as start position at power up.
29+
30+ Feedback as always is welcome.
31+
2932
3033### Power up / down
3134
3235(from datasheet)
33- On power-up, wiper position will be loaded within a maximum time
34- period of 500µs once the power-supply is stable.
35- Additionally, the three-terminal interface port will be active after 50 ms.
36+ On ** power-up** , wiper position will be loaded within a maximum time
37+ period of ** 500 µs ** once the power-supply is stable.
38+ Additionally, the three-terminal interface port will be active after ** 50 ms** .
3639
37- On power-down, the wiper position register data will be ** lost** .
40+ On ** power-down** , the wiper position register data will be ** lost** .
3841On the next device power-up, the value of
3942EEPROM memory will be loaded into the wiper position register.
4043
4144There is no defined factory default, expect the value to be random.
45+ As the device has no feedback, one must send 100 pulses to move the trimmer to the begin or end point.
46+
47+
48+ ### Alternative use
4249
50+ One could use the UP/ DOWN pins of the device to read signals from an
51+ external system. The microprocessor could monitor the state by means of an
52+ ADC measurement (and optional act upon it).
53+
54+ This is not implemented in the library, just worth to mention.
55+
4356
4457### Related
4558
46- Other digipots
59+ Other digipots (not all)
4760
4861- https://github.com/RobTillaart/AD520x
4962- https://github.com/RobTillaart/AD524X
@@ -67,13 +80,18 @@ Other digipots
6780- ** void begin(bool b = false)** initializes pins,
6881default the device is not selected.
6982
83+
7084### Base
7185
7286- ** void select(bool b)** enable / disable device.
73- - ** void moveUp(uint8_t n = 1)** if enabled move position n steps up (n is clipped to 0..100)
74- - ** void moveDown(uint8_t n = 1)** if enabled move position n steps down (n is clipped to 0..100)
87+ - ** bool selected()** returns current status (csPin).
88+ - ** void moveUp(uint8_t steps = 1)** if enabled move position n steps up (steps is clipped to 0..100)
89+ - ** void moveDown(uint8_t steps = 1)** if enabled move position n steps down (steps is clipped to 0..100)
90+
91+ Duration of moveUp/Down depends linearly on the parameter steps, expect less than half a millisecond.
92+
93+ Note: One must send 100 pulses to move the trimmer to the begin or end point. (no feedback).
7594
76- Duration of moveUp/Down depends linearly on n, expect less than half a millisecond.
7795
7896### EEPROM power up value
7997
@@ -95,15 +113,14 @@ See **DS1804_save_EEPROM.ino**
95113
96114#### Should
97115
98- - array example (sharing UD, INC pins, unique CS)
99- - stereo example, (sharing all pins).
100116
101117#### Could
102118
103119- default true for select() / begin()?
104120
105121#### Wont
106122
123+ - void mute(); (depends on 3 pins if up or down is mute)
107124
108125## Support
109126
0 commit comments