serial communication between avr and simulink.
2 次查看(过去 30 天)
显示 更早的评论
Hi all. I am not good at English.
I am trying to make a connection between avr and simulink via rs 232. but there is a critical problem.
first, I am thinking of the control system like this. avr acquires sensor data and sends them to pc and pc computes control output with those data. then pc sends the control signal to avr.
the mcu circuit was made and the duflex data trasmission is done well so far with up to 50Hz(max.) sampling rate and echo delay of 50ms(average).
the echo delay means the time elapsed while avr sends data packets to pc and pc reflects them to avr. the setting is the best I could make.
but my target system needs sampling rate of at least 150Hz and echo delay less than 10ms which I tried many times but failed.
To improve the performance, I looked for solutions. real time windows target or xPC target seemed to be the answer but those seem to need the extra hardware and have too many useless functions. is it right? please tell me if I misunderstood.
To make it short, I just want to make serial communication which meets the requirements above. please advice me the best way to solve this problem.
I don't know how to upload mdl file on this. I will send the file if you need it when you leave the email address.
thank you for reading.
1 个评论
Kaustubha Govind
2013-6-24
What Simulink blocks do you use to achieve the serial communication? Do you have generic C/C++ code that you can run from Simulink that will do the right thing for you?
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Communications Toolbox 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!