I need a charlieplexed function, not with LEDs but with buttons via ADC, so that it can be used with a Tiny85. For example, 1 ADC with 8 connected buttons… or at most a real charlieplexed setup with 3 pins giving 6, 8, etc. Could you let me know something? My project is stuck…
Thanks, Solozerouno.
Need to read...
-
- Posts: 119
- http://meble-kuchenne.info.pl
- Joined: Tue Dec 08, 2020 4:36 am
- Has thanked: 2 times
- Been thanked: 2 times
-
- Valued Contributor
- Posts: 1546
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 138 times
- Been thanked: 737 times
Re: Need to read...
Take a look at https://www.pcbheaven.com/wikipages/Charlieplexing/
Has some info on buttons as well as LEDs..
Martin
Has some info on buttons as well as LEDs..
Martin
-
- Valued Contributor
- Posts: 1604
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 357 times
- Been thanked: 565 times
Re: Need to read...
Hi
In addition to Martin's example above I believe he also gave an example of using a resistor chain on an ADC pin elsewhere, possibly in the old forum.
Briefly you have, for example, four resistors (1% tolerance) in series between +5v and 0v, with R1 connected to 0v and R4 connected to 5v. Connect your ADC to the junction point of R1 and R2 and your buttons connected across R2 / R3 / R4 to short them out as required. You could have as many buttons / resistors as practical.
When you read the ADC your voltage will be dependent on which resistors are in the circuit and which are shorted out. Careful consideration of values is needed to give clear differences that are unique. Many "buttons" can be connected to a single pin using this method.
Charlieplexing is a very cool way to do things but can be a little complicated if just needing extra button / switch inputs.
Also, have you considered using an I/O Expander? Flowcode supports such too. Many input / Ouputs using I2C.
Regards
In addition to Martin's example above I believe he also gave an example of using a resistor chain on an ADC pin elsewhere, possibly in the old forum.
Briefly you have, for example, four resistors (1% tolerance) in series between +5v and 0v, with R1 connected to 0v and R4 connected to 5v. Connect your ADC to the junction point of R1 and R2 and your buttons connected across R2 / R3 / R4 to short them out as required. You could have as many buttons / resistors as practical.
When you read the ADC your voltage will be dependent on which resistors are in the circuit and which are shorted out. Careful consideration of values is needed to give clear differences that are unique. Many "buttons" can be connected to a single pin using this method.
Charlieplexing is a very cool way to do things but can be a little complicated if just needing extra button / switch inputs.
Also, have you considered using an I/O Expander? Flowcode supports such too. Many input / Ouputs using I2C.
Regards