MATLAB Answers

Updating Arduino Registers Value From Simulink

조회 수: 6(최근 30일)
Taimur Zaman
Taimur Zaman 14 May 2018
댓글: Ameer Hamza 15 May 2018
HI Everyone! I am working currently on the transformation of Arduino code to Simulink blocks. However, at some points in my code, i am using feedback which changes the respected values of timer registers like TCCR1A and TCCR1B and accordingly i have updated values of TCNT and OCR aswell. is there any one, to comment on this.

  댓글 수: 0

댓글을 달려면 로그인하십시오.

채택된 답변

Ameer Hamza
Ameer Hamza 14 May 2018
Simulink support package for Arduino does not provide a block to directly change internal registers. You might be able to do this by creating your custom block as described here. Defining your custom block allow you to implement functionality which is provided by the hardware but not currently supported by Simulink support package.

  댓글 수: 2

Taimur Zaman
Taimur Zaman 15 May 2018
Thank You Hamza for your comments, I was expecting this answer, but i am looking for alternate ways. Because i am familiar with Simulink & Matlab, but Arduino is quite challenging to me for the time being.
Ameer Hamza
Ameer Hamza 15 May 2018
From the documentation, it appears that there is no other alternative to change register values directly from Simulink, by just using the default blocks provided by the support package.

댓글을 달려면 로그인하십시오.

추가 답변(0개)

Translated by