i think i could finally get something. i connected the ALE pin i.e 30th pin of 8051 as clock to adc0808. Its suppose to give 1/6th of 11.0592MHz ie.like 1.8432 Mhz. But adc max clock is specified as 1.28Mhz :-?. Also i have connected pin 31 to Vcc.
First i tested pain single character sending to matlab from uc and found to time it took to fill a large InputBufferSize and concluded that it was more than 5000 samples which is close to the theoretical 57600/10=5760. So my usb-> serial was okay.
Then i minimized all the delays in the adc operations. used timer instead of loop delays. It turns out adc0808 is not that slow. It will do adc faster than the uart can send samples to pc. No special delays were required between setting ALE,SC,OE,ADDRESS etc. But the high clock was a must. I have also not used any timer and serial interrupts. Just get adc value in accumilator, put in SBUF and monitor TI flag.
This method gives me around 4500 samples/sec. the 4 q flip flop method in mazidi will not work as the input from crystal is insufficient to drive the Flipflops.
Also keep sufficent InputBufferSize in matlab serial around 50MB. This is not good for audio signals, but for ECG,EEG,EMG etc it will do.
Attached picture of 800 Hz sine. Multiply the circles in a period with
time period 2ms to get sampling rate.
i'll come with if more trouble comes.
ps. also adding 800Hz sine , spline interpolated to triple sampling rate in matlab