serial communication between avr and simulink.
2 views (last 30 days)
Show older comments
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 Comment
Kaustubha Govind
on 24 Jun 2013
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?
Answers (0)
See Also
Categories
Find more on Communications Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!