Writing user defined functions along with PE

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Writing user defined functions along with PE

跳至解决方案
1,368 次查看
pinakinmunot
Contributor I

Hello !

I am using CW v10.4 for programming MC 13213, which is an SoC having an 802.15.4 compliant Modem + HCS08 MCU, in C language.

I have used Processor Expert to generate codes for pin control and port control.

Now, I want to add functions for writing commands and data to a 16x2 LCD, attached to my MCU.

I have written the functions needed for the same, namely lcd_data() and lcd_cmd().

All the pin assignments needed for LCD control are done in these functions.

However, can somebody please tell me where to add these functions in the project ?

Also, how to add a Header/Source file containing these the LCD data and command functions to my project ?

What is the syntax for the Header/Source files ?

Thanks in advance !

- Pinakin.

0 项奖励
回复
1 解答
1,186 次查看
BlackNight
NXP Employee
NXP Employee

I'm using Processor Expert too with the MC13213, and have written a LCD component for it.

Have a look at

http://mcuoneclipse.com/2012/12/22/hd44780-2x16-character-display-for-kinetis-and-freedom-board/

Character LCD with 4 Lines | MCU on Eclipse

http://mcuoneclipse.com/2014/01/02/character-lcd-with-4-lines-and-up-to-64-characters-per-line/

To your very general question: that's basically up to you as a programmer how you structure the source files.

You might have a look at the code of above components how this can be done.

This post explains how to import the component:

Processor Expert Component *.PEupd Files on GitHub | MCU on Eclipse

I hope this helps as a starter.

在原帖中查看解决方案

2 回复数
1,187 次查看
BlackNight
NXP Employee
NXP Employee

I'm using Processor Expert too with the MC13213, and have written a LCD component for it.

Have a look at

http://mcuoneclipse.com/2012/12/22/hd44780-2x16-character-display-for-kinetis-and-freedom-board/

Character LCD with 4 Lines | MCU on Eclipse

http://mcuoneclipse.com/2014/01/02/character-lcd-with-4-lines-and-up-to-64-characters-per-line/

To your very general question: that's basically up to you as a programmer how you structure the source files.

You might have a look at the code of above components how this can be done.

This post explains how to import the component:

Processor Expert Component *.PEupd Files on GitHub | MCU on Eclipse

I hope this helps as a starter.

1,186 次查看
pinakinmunot
Contributor I

BlackNight , Thank you for your help !

After some initial struggle, I have been able to add the LCD component to my project and compile it successfully.

Now I will proceed for checking it on Hardware !

- Pinakin

0 项奖励
回复