tux21
Junior Member level 3
i have to get around upto 900 Hz signal in MATLAB for which i use adc0808 with 8051 AT89S52
i use uC pin to generate clock of about 230kHz for adc. when i use 4 D flipflops to divide 11.0592MHz clock of uC by 16 and give it to adc it doesn't work(given like this in Mazidi book)
Now, i am able to get enough sampling rate for sine waves upto 50Hz but above that i get distorted conversion most likely due to undersampling as in figure attached . I have configured the uC to continuously operate the adc and send values to pc via serial port.
baud rate is set at highest possible 57600. matlab collects these binary values and stores in its serial port inputbuffer (1 MB) from where i read them to plot.
My problem is i am not able to get sufficent sampling rate for signals above 50Hz when i test with a sine wave generator.
The sampling rate is not controlled by me.
Plz help. I attach the assembly code with comments as well
i use uC pin to generate clock of about 230kHz for adc. when i use 4 D flipflops to divide 11.0592MHz clock of uC by 16 and give it to adc it doesn't work(given like this in Mazidi book)
Now, i am able to get enough sampling rate for sine waves upto 50Hz but above that i get distorted conversion most likely due to undersampling as in figure attached . I have configured the uC to continuously operate the adc and send values to pc via serial port.
baud rate is set at highest possible 57600. matlab collects these binary values and stores in its serial port inputbuffer (1 MB) from where i read them to plot.
My problem is i am not able to get sufficent sampling rate for signals above 50Hz when i test with a sine wave generator.
The sampling rate is not controlled by me.
Plz help. I attach the assembly code with comments as well