Need help on M5211DEMO UART program

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Need help on M5211DEMO UART program

2,322件の閲覧回数
MrWrong
Contributor I
Hi all,

I'd like to write a simple program to test the UART on M5211DEMO board. My program just needs to get a character sent by the PC COM1 port. Since I am a newbie to this board, can anyone help me get started?

Thank you.
ラベル(1)
0 件の賞賛
返信
2 返答(返信)

1,109件の閲覧回数
J2MEJediMaster
Specialist I
If you're using Codewarrior, take a look in the (Codewarrior Examples) directory. There are several example programs in there, one which has some UART code. This should help jump-start your work.

---Tom
0 件の賞賛
返信

1,109件の閲覧回数
MrWrong
Contributor I
Thank you very much for your reply.

Yes, I'm using the CodeWarrior software version 6.3. I looked into the (CodeWarrior Examples) folder and saw that M5208EVB using UART codes. However, the program does not show me how to read a character from UART. Are these the following steps we should do to use the UART in M5211DEMO board:
1. Initialize UART by uart_init(0, 83333, 19200, 0)
2. Wait for a character being present at the UART by uart_getchar_present(0)
3. If a character is present, read it by uart_getchar(0)

Please let me know if I'm missing out anything or is it the right process to do with UART?

Thank you very much.
0 件の賞賛
返信