You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Arduino 1.8.13, all libraries and boards up to date.
The hardware, ESP8266 (Wemos D1 Mini R1) running at 80MHz, hardware SPI to MCP3208, 3.415V VDD/VREF. There is a 470uF cap between the VDD/VREF, and ground, plus another 100pF cap in parallel with that. VDD is flat/quiet on an oscilliscope.
Constructor is MCP3208(3415, 0) // VREF, CS_PIN
SPI clock is set to 1.6MHz, MODE0, per examples.
Reading MCP3208::Channel::SINGLE_0, the value 4095 isn't returned by read() until pin 1 is at 4.000 VDC: above the VREF. Shorting pin 1 to pin 16 returns 3910.
I expected a return of 4095 when pin 1 reaches 3.415 VDC, same as the VREF.
The adc_sample.ino example, modified only for ADC_VREF and CS pin, behave the same way my own sketch behaves: 4095 is only returned by read after pin 1 reaches 4.000 V.
Shorting pin 1 to pin 15 (VREF), MCP3208::read() returns only 3915.
It looks like a genuine MCP3208, and it came from Mouser.
4.000V is suspiciously ... round but could just be chance. I haven't tried changing SPI clock frequency.
All measurements are w/ Fluke 179, Rigol scope, and BK bench supply, though VDD is off the 3v3 pin of the ESP8266 (hence the additional filter caps).
The text was updated successfully, but these errors were encountered:
Arduino 1.8.13, all libraries and boards up to date.
The hardware, ESP8266 (Wemos D1 Mini R1) running at 80MHz, hardware SPI to MCP3208, 3.415V VDD/VREF. There is a 470uF cap between the VDD/VREF, and ground, plus another 100pF cap in parallel with that. VDD is flat/quiet on an oscilliscope.
Constructor is MCP3208(3415, 0) // VREF, CS_PIN
SPI clock is set to 1.6MHz, MODE0, per examples.
Reading MCP3208::Channel::SINGLE_0, the value 4095 isn't returned by read() until pin 1 is at 4.000 VDC: above the VREF. Shorting pin 1 to pin 16 returns 3910.
I expected a return of 4095 when pin 1 reaches 3.415 VDC, same as the VREF.
The adc_sample.ino example, modified only for ADC_VREF and CS pin, behave the same way my own sketch behaves: 4095 is only returned by read after pin 1 reaches 4.000 V.
Shorting pin 1 to pin 15 (VREF), MCP3208::read() returns only 3915.
It looks like a genuine MCP3208, and it came from Mouser.
4.000V is suspiciously ... round but could just be chance. I haven't tried changing SPI clock frequency.
All measurements are w/ Fluke 179, Rigol scope, and BK bench supply, though VDD is off the 3v3 pin of the ESP8266 (hence the additional filter caps).
The text was updated successfully, but these errors were encountered: