Wednesday, 22 April 2015

[Freescale K20D50M MCU Programming] #3 Blinky GPIO - External LED

#3  Blinky External LED 

In [Freescale K20D50M MCU Programming]  #2 Blinky Red LED  onboard, We tried blinky with onboard LED. Lets try out blinking the external LED connected to a GPIO pin.. We are going to use Codewarrior and processorexpert with FRDM-K20D50M board

Take a look at the [Freescale K20D50M MCU Programming] #1 Helloworld on the Console using Processor Expert  for quickstart  

Lets get started.

First we need to see the schematic to identify the GPIO pin for our external LED.  There is a good youtube video which gives an example on K25Z board.

and the pin connectivity as below

Now Lets create a new project as mentioned in [Freescale K20D50M MCU Programming]  #2 Blinky Red LED  onboard we add a BITIO_LDD Component

And setting the properties to PTD0

I have added a WAIT custom component from processor expert to show a delay

And add this code in main.c



And you see the external LED Blinking.


No comments:

Post a Comment