MATLAB Answers

Daniel
0

How do I get Arduino UNO with ATmega8 work with Simulink?

Asked by Daniel
on 19 Jul 2014
Latest activity Answered by Sreeram
on 22 Jul 2014
Hi!
I new to this forum and MATLAB and Simulink and i hope i will have a great time with it. Im using the new AVR platform, called Arduino. My card is Arduino UNO. The UNO cars using ATmega328 CPU but im have others ATmega too such as ATmega8, ATmega45, ATmega168.
If i place an ATmega8 or ATmega168 onto the UNO card (remove the ATmega328) and burn the code from Simulink onto the UNO card it says
"The call to realtime_make_rtw_hook, during the after_make hook generated the following error: Could not connect to specified Arduino board.
Verify that the board is connected to your host, and that the host COM port number set in the model matches the COM port number in Windows.
To change the host COM port number in the model, click 'Tools', click 'Run on Target Hardware', and click 'Options... In the dialog that opens, set the Host COM port number.
To find out the COM port number in Windows, open Device Manager and open your board in the COM ports group.
The build process will terminate as a result.
Caused by: Could not connect to specified Arduino board.
Verify that the board is connected to your host, and that the host COM port number set in the model matches the COM port number in Windows.
To change the host COM port number in the model, click 'Tools', click 'Run on Target Hardware', and click 'Options... In the dialog that opens, set the Host COM port number.
To find out the COM port number in Windows, open Device Manager and open your board in the COM ports group. "
That means that Simulink cannot regonize the UNO card if im using a diffrent ATmega CPU.
My questions is: How do i add so i can use ATmega8 on the UNO card and program with Simulink? I can use the ATmega8 with the UNO card if im unisng the Arduino IDE and code in the language C.

  0 Comments

Sign in to comment.

1 Answer

Answer by Sreeram
on 22 Jul 2014

Hi Daniel,
By design the Simulink Support package does not cover this use case of swapping the microcontroller on the board and supports only standard boards like the UNO, Mega, Nano and the accompanying chipsets.
Now on the other hand if you possess a Coder license you can access the make files and look for the processor specific flags which can let you manually achieve what you are intending to achieve.
Thanks, Sreeram Mohan

  0 Comments

Sign in to comment.