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.
Solved! Go to Solution.
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!
-----------------------------------------------------------------------------------------------------------------------
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
HI Zhe Tian,
Thank you for your reply, would you like show me where is " Hello World" demo ?
Minh
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!
-----------------------------------------------------------------------------------------------------------------------
Thank you Jorge_Gonzalez
It's really useful links.
Minh.