step by step instruction to configure processor expert for UART communication and code warrior code for UART communication.
IDE codewarrior 10.4
I am using the latest version of CodeWarrior 10.6.4 but the following instructions are the same as for CodeWarrior 10.4.
When you create a new Bareboard project for the K20DX256 (72MHz family) with Processor Expert enabled (select File > New > BareBoard project in the main menu and follow the wizard dialogs) . You can add UART driver by the following way:
- Open the Components Library window, Alphabetical tab and double click on AsynchroSerial component (add the component into your project).
- Double click on the component in the Components window (open the Component Inspector of the AsynchroSerial component).
- Select the Baud rate (e.g. write 9600 into the Baud rate property)
- Select the Channel (UART device) and RxD, TxD pins (if the default selection is not correct for your target board)
- Generate Processor Expert code, see below:
Open the context menu of the AsynchroSerial component and select "Help on Component", select link "Component AsynchroSerial Typical Usage", see the screenshot below.
The Typical Usage contains examples of code for this component (Send and Receive of data).
Retrieving data ...