I have entered an absolutely stable voltage of 557,3 mV (verified with my 5 digits multimeter and absolutely clean according to my oscilloscope) on pin 37 of an ESP32 Wroom.
Here is my code:
Code: Select all
Setup:
...
analogReadResolution(10); // 10Bit resolution
analogSetAttenuation(ADC_0db); // 0=0db (0..1V) 1= 2,5dB; 2=-6dB (0..2V); 3=-11dB
...
Loop:
...
A0Raw = analogRead(37); // 1st read 0...1V = 0 ..1023
delay(20);
A0Raw += analogRead(37); // 2nd read
delay(20);
A0Raw += analogRead(37); // 3rd read
A0Raw = A0Raw / 3;
Serial.println (A0Raw);
...
Delay (970);
392
469
455
454
464
451
458
455
453
440
451
450
477
460
469
446
443
450
453
450
450
466
440
452
467
440
384
447
445
...
That is NOT what I expected to get from a decent DAC!
Espressif, what did you do?
Have you got any way to fix that?
+- 2 LSB is acceptable, but not that random cr*p!