Hi all,
I would like to monitor two 50Hz sine waves. One of my biggest problem is that the sampling rate is not too high (the maximum i could make was about 110samples/period @ 50Hz). I tried to adjust the prescale factor to 4 bits, but its not really punctual, so i use 32-bit prescaling. I also want to draw the waves in matlab which collects the infos from the arduino via a serial port. If I'm right, the maximum baudrate a Uno can handle is 2Mbaud so with these settings i should get a lot more than ~100 samples. (The samples are integers from 0 to 1023)
I have a DDS function generator which makes a sine wave and i wanted to simulate another sign (square) with a switchbutton and measure its frequency with the pulsein function and print it to the lcd display too but in this case sampling rate decreases about 2-3samples/period. It looks like to me that some communication protocoll is not fast enough for all those things.
My question is that can i increase/min. duble the sampling rate while i have two sine signs both at 50 Hz, print the frequency and phase shifts (two square waves from those sines) to the lcd and send the sine waves' datas to matlab to draw them?
Thank you for the answers in advance!