필터 지우기
필터 지우기

trying to change frequency of pwm arduino uno

조회 수: 4 (최근 30일)
msh jgtu
msh jgtu 2020년 11월 17일
댓글: saber souid 2021년 4월 20일
i want to connect arduino uno to matlab so i write s-function in matlab simulink file. i am trying to change frequency of pwm of arduino uno so i wrote this line in s-function but i got error
this is the code
TCCR2B = TCCR2B & B11111000 | B00000001; // for PWM frequency of 31372.55 Hz
the error message is
[code]G:/MA1AE7~1/freq31khz_wrapper.c:46:19: error: 'B11111000' undeclared (first use in this function)
TCCR2B = TCCR2B & B11111000 | B00000001; // for PWM frequency of 31372.55 Hz
^
G:/MA1AE7~1/freq31khz_wrapper.c:46:31: error: 'B00000001' undeclared (first use in this function)
TCCR2B = TCCR2B & B11111000 | B00000001; // for PWM frequency of 31372.55 Hz
^
gmake: *** [freq31khz_wrapper.o] Error 1
### Build procedure for model: 'arduinoled' aborted due to an error.
Error(s) encountered while building "arduinoled":
### Failed to generate all binary outputs
  댓글 수: 2
msh jgtu
msh jgtu 2020년 11월 18일
any help
saber souid
saber souid 2021년 4월 20일
can you send it to me to see the problem
saber.souid@outlook.com

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Waveform Generation에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by