Acqusition problem

hello
I tried to acquire an analog signal (sinusoidal shape with a frequency of 50Hz) using MATLAB/SIMULINK and an analog input pin of ARDUINO MEGA 2560.
The model was run in external mode.
However, the visualised signal does not match the original signal; it has a discontinuous shape
attached is the program that I have used
Thank you for your help
Best regards

Acquistion_test.pdf (5.81 KB)

Hi,

I know of, but am not familiar with MATLAB/SIMULINK, does this mean you have not actually physically built the circuit, but are simulating it in software?

I'm soory but if that is the case, then be adventurous and build and try it with an oscilloscope.

Tom...... :) PS, How many threads have you started about your problem>

yes, give us some more details

50Hz sine huh - as in a real signal ?

You're not going to show us the simulink scope output ?

What model?

Can you clarify external mode - do you mean ADC using AREF pin (ie analogReference (EXTERNAL))

Where is your code? We need this to figure out what you are doing.

Cross-post. Locked