I have problem with Uart

Hi everyone i'm working on UART communication between Matlab and Tiva C series. I'm triyng to send 8 bit data from Matlab to Uart.The code works except the values between 128 and 160.Is there anyone who has similar problem? The code has 600 lines so i can not post it here

回答 (2 件)

Walter Roberson
Walter Roberson 2016 年 1 月 5 日

0 投票

128 to 159 corresponds to the control characters with their high bit set. Especially you have parity generation turned on then the characters might be discarded. But if you do have parity turned on then unless you configured for 9 bits per character (rare!) then you should also be having trouble distinguishing between other characters and the character 128 higher.
What are you using to interface to the UART port? UART are TTL level and so cannot be spoken to directly by an RS232 port or a USB to Serial device (but there are USB to TTL devices.)

2 件のコメント

burak erdogan
burak erdogan 2016 年 1 月 5 日
編集済み: Walter Roberson 2016 年 1 月 5 日
s = serial('COM45','InputBufferSize', 1,'BaudRate',115200,'DataBits', 8, 'Parity', 'none','StopBits', 1);
That is my arrengment line. I use FTDI chip at between microcontroller and PC
Walter Roberson
Walter Roberson 2016 年 1 月 5 日
Which FTDI device are you using? The discussion I find for them suggests that they concentrate on USB devices. USB to serial devices have... difficulties... that non-USB devices do not have.

サインインしてコメントする。

Marcis Prieditis
Marcis Prieditis 2016 年 7 月 28 日

0 投票

I have the same problem!
Can it be solved somehow? For example, by using different Matlab version or installing some update?

1 件のコメント

Walter Roberson
Walter Roberson 2016 年 7 月 28 日
What are you using to interface to the UART?

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeInstall Products についてさらに検索

タグ

質問済み:

2016 年 1 月 5 日

コメント済み:

2016 年 7 月 28 日

Community Treasure Hunt

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

Start Hunting!

Translated by