I am using a Raspberry Pi 3 Model B to read the signal generated by a function generator. I have used PCF8591 fitted in YL-40 PCB as the ADC. I have used python for establishing the I2C communication between the Rpi and PCF8591. But, I am getting undesirable values when I run the setup.
The connection between the Rpi and PCF8591 are as follows-
(Rpi) (PCF8591)
Pin 1 -> VCC
Pin 3 -> SDA
Pin 5 -> SCL
Pin6 -> GND
The generated wave was: Frequency = 1KHz; Amplitude = 1 Vpp; DC offset = 0
A picture of the python code I used, the output when the function generator is not connected, the output when the function generator is attached and the connection between the ADC and the function generator is attached below.