필터 지우기
필터 지우기

I want to ask how can I send uint8 data through my serial communication?

조회 수: 1 (최근 30일)
Roc Sa
Roc Sa 2013년 7월 3일
Hi!
I have built a serial communication between simulink and my Microcontroller evaluationboard. In the first step I hve sent a constant 1 and it worked pout, but in the next step I want to send uint8 data. In the next steps I want to extend my model step by step sending more data.
The To instrument block and query instrument block are expecting double and this causes me a problem. How can I manage this? I would be glad for a hint.
Thanks and greetings

답변 (1개)

Chad Gilbert
Chad Gilbert 2013년 7월 3일
You can convert numeric values in MATLAB to uint8 using the "uint8" command. See "help uint8" for more info. Or, you may need to use the "typecast" command. See "help typecast" for more info.
  댓글 수: 1
Walter Roberson
Walter Roberson 2013년 7월 3일
"To Instrument Block" and "Query Instrument Block" are part of Simulink, so perhaps the procedure is different?

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

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by