Is a R-2r ladder DAC for switches limited to 12 switches for ESP32?
Posted: Mon Mar 02, 2020 11:04 pm
Hello all,
I am pretty new to arduino, I have been working with them for years but only a few projects over that time, so please forgive the following question:
I made a R-2r ladder similar to https://github.com/mickey9801/ButtonFever but with with a debounce capacitor.
I was hoping to get away with using this to operate 14 switches but understood that the ESP32 is 12 bit and figured I might be limited to 12 switches for that reason. After testing my ladder, switches 0 and 1 are not recognized but 2-13 are (and are quite stable).
Can someone confirm that this is due to the pin (35 in this case) being 12 bit and that more then 12 switches are not possible on a single pin using a R-2r? Or should I be looking for the problem somewhere else?
And yes, I know I could just use a PFC8575 - I ordered a few from china but the seller never shipped them, then I ordered a few from a US seller via ebay to get them faster and they were lost in the mail, what I do have is a box of full of resistors and capacitors and an approaching deadline.
Thanks for your help, Travis
I am pretty new to arduino, I have been working with them for years but only a few projects over that time, so please forgive the following question:
I made a R-2r ladder similar to https://github.com/mickey9801/ButtonFever but with with a debounce capacitor.
I was hoping to get away with using this to operate 14 switches but understood that the ESP32 is 12 bit and figured I might be limited to 12 switches for that reason. After testing my ladder, switches 0 and 1 are not recognized but 2-13 are (and are quite stable).
Can someone confirm that this is due to the pin (35 in this case) being 12 bit and that more then 12 switches are not possible on a single pin using a R-2r? Or should I be looking for the problem somewhere else?
And yes, I know I could just use a PFC8575 - I ordered a few from china but the seller never shipped them, then I ordered a few from a US seller via ebay to get them faster and they were lost in the mail, what I do have is a box of full of resistors and capacitors and an approaching deadline.
Thanks for your help, Travis