LCD16x2 and GCC compiler

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

LCD16x2 and GCC compiler

ソリューションへジャンプ
838件の閲覧回数
nguyennhatminh
Contributor IV

Hi Pro,

I'm going to build a driver that control the LCD 16x2 so I have a question about

GCC compiler on Codewarrior IDE for FreedomKinetis KL05Z.

when I code :

For example: printf(" I love freescale")

does it call the function putch(char c) ?

Thank you.

ラベル(1)
タグ(2)
0 件の賞賛
1 解決策
566件の閲覧回数
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello:

I think you already downloaded the "KL05_SC" package. The project is called "kl05_frdm_demo"

However I think you might find that example difficult to figure out how to use your LCD with prinft.

In this case you need to create your own level driver so that the last function called is your specific function for talking with the LCD. I recommend you to check the next tutorial by colleague Erich Styger:

printf() with the FRDM-KL25Z Board and without Processor Expert | MCU on Eclipse

You will see that in the file ConsoleIO.c, in the function __write_console() you have a call to UART0_PDD_PutChar8(). Here you would put instead your LCD function.

And also if you are willing to use Processor Expert, then there is a LCD component created also by Erich. Check this:

HD44780 2×16 Character Display for Kinetis and Freedom Board | MCU on Eclipse

Hope this helps!


Regards!
Jorge Gonzalez

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

元の投稿で解決策を見る

0 件の賞賛
4 返答(返信)
566件の閲覧回数
Paul_Tian
NXP Employee
NXP Employee

Hi, Minh

Function printf does not call such function putch(char C). I cannot find which MCU you used, but I think you can develop your project base on our "hello world" demo.Then you no need to care about printf function.

Hope my reply can help you.

Best Regards

Paul

0 件の賞賛
566件の閲覧回数
nguyennhatminh
Contributor IV

HI Zhe Tian,

Thank you for your reply, would you like show me where is " Hello World" demo ?

Minh

0 件の賞賛
567件の閲覧回数
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello:

I think you already downloaded the "KL05_SC" package. The project is called "kl05_frdm_demo"

However I think you might find that example difficult to figure out how to use your LCD with prinft.

In this case you need to create your own level driver so that the last function called is your specific function for talking with the LCD. I recommend you to check the next tutorial by colleague Erich Styger:

printf() with the FRDM-KL25Z Board and without Processor Expert | MCU on Eclipse

You will see that in the file ConsoleIO.c, in the function __write_console() you have a call to UART0_PDD_PutChar8(). Here you would put instead your LCD function.

And also if you are willing to use Processor Expert, then there is a LCD component created also by Erich. Check this:

HD44780 2×16 Character Display for Kinetis and Freedom Board | MCU on Eclipse

Hope this helps!


Regards!
Jorge Gonzalez

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
566件の閲覧回数
nguyennhatminh
Contributor IV

Thank you Jorge_Gonzalez

It's really useful links.

Minh.

0 件の賞賛