Serial Write
R2026bWrite data to serial port
Serial Write block

To add a block to a model, double-click the canvas and start typing the block name. Then, select the block from the list.
Libraries:
NVIDIA Jetson and NVIDIA DRIVE /
Communication
Description
Add-On Required: This feature requires the MATLAB Coder Support Package for NVIDIA Jetson and NVIDIA DRIVE Platforms add-on.
Use the Serial Write block to write data to a serial device connected to a NVIDIA® Jetson™ hardware. To open the serial pin map of the NVIDIA Jetson board, click the View pin map button. For more information, see Serial Port Mapping for NVIDIA Jetson Boards.
Examples
Read and Write Data over Serial Port on NVIDIA Jetson Platforms
Use MATLAB® Coder™ Support Package for NVIDIA® Jetson® and NVIDIA DRIVE® to read and write serial data over the UART port on a Jetson board.
Ports
Input
The input port through which the block accepts data.
Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32
Parameters
The port at which you connect the NVIDIA Jetson board to the serial device.
Programmatic Use
Block Parameter:
SCIModule_
|
| Type: character vector |
Values:
valid name| |
Default:
'/dev/ttyTHS1' |
Select the rate at which the data is read over the serial line. The baud rate is measured as the number of bits read per second.
Programmatic Use
Block Parameter:
Baudrate_
|
| Type: character vector |
Values:
'50'
'75'
'110''134'
'150'
'200'
'300'
'600''1200'
'1800'
'2400'
'4800'
'9600'
'19200'
'38400'
'57600'
'115200'
'230400'| |
Default:
'9600' |
Select the parity you want to add to the transmitted data. A parity bit is used to detect error in the data transmission.
None – This value means that no parity is used for error detection in the data transmission.
Even – The parity bit value is 1 if the number of bits with value 1 is odd. The parity bit value is 0 if the number of bits with value 1 is even.
Odd – The parity bit value is 1 if the number of bits with value 1 is even. The parity bit value is 0 if the number of bits with value 1 is odd.
Programmatic Use
Block Parameter:
Parity
|
| Type: character vector |
Values:
'None'| 'Even'
'Odd' |
Default:
'None' |
Select the number of bits used to signal the stop of data transmission.
Programmatic Use
Block Parameter:
StopBits_
|
| Type: character vector |
Values:
'1'| '2'
|
Default:
'1' |
Version History
Introduced in R2020b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
