Mismatches in acquired digital signal in Simulink using Arduino Due
2 次查看(过去 30 天)
显示 更早的评论
Hi,
I was doing some simple signal acquisition models in Simulink (Matlab ver. R2017b) with Arduino Due board. I was giving a unipolar square wave (250 Hz) from a function generator to pin 8 of the Arduino Due microcontroller. The 'digital input' block in Simulink is used and the output of the block is connected to a scope. In the 'digital input' block, the sample time is set as 0.001.
Now, when I'm observing the signal, in the scope, it is not at all replicating the input. On the other hand, when I ran the exact same code in Arduino Uno, with the same square wave, the scope is showing the proper output. I've attached couple of pictures of scope outputs, which demonstrate the two scenarios.
Can anybody tell, what can be reason of this mismatch?
Looking forward to some solution of this problem.
3 个评论
Roshni Garnayak
2019-9-9
Please create a service request at https://www.mathworks.com/support/contact_us.html
回答(1 个)
Arun Kumar
2019-9-25
Hi,
I think the issue is due to the operating voltages. Due is ARM based board and works at 3.3V while Uno(and other AVR boards) operate at 5V.
I suggest checking the output voltages on the function generator. For Due, max should be 3.3V.
HTH.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Run on Target Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!