You are currently viewing How to Interface LEDs with ARM9 Stick Board

How to Interface LEDs with ARM9 Stick Board

Spread the love

The is specifically designed to help students to master the required skills in the area of embedded systems. The board is designed in such way that all the possible features of the microcontroller will be easily used by the students. The board supports Keil Β΅Vision 4 compilers with Keil ULink2.

NXP Microcontroller,ARM9-LPC2929 stick board is proposed to smooth the progress of developing and debugging of various designs encompassing of speed 32-bit Microcontrollers. It integrates CAN, LIN, UART, ADC, PWM, I2C, SPI, Timer, Interrupt etc., to create a stand-alone versatile test platform.

ARM9 Stick Board having more no of I/O line for user access able. Its consists of 64 GPIO pins, CAN0/1, LIN1, I2C0/1, UART0/1, SPI0/1, USB, ADC0/1/2, PWM, Timer and more features. Users can easily access the controller and develop more application by using

LED (Light Emitting Diodes)

Light Emitting Diodes (LED) is the most commonly used one component, usually to display the pins digital states. Typical uses of LEDs include timers, alarm devices & confirmation of user input such as a keystroke or mouse click.

Interface LED with ARM9 Stick Board

Figure shows how to interface the LED to microcontroller. As you can see the Cathode is connected through a resistor to GND & the Anode is connected to the Microcontroller pin. So when the Port Pin is HIGH the LED is ON & when the Port Pin is LOW the LED is turned OFF.


interfacing-led-with-arm9-stick-board

Circuit Diagram to Interface LED with ARM9 Stick Board

circuit-diagram-to-interface-led-with-arm9-stick-board

Example for ARM9 Stick Interface with LED’s


arm9-stick-interface-with-led

#include  //Register Description Header for LPC2929
#define LED 0xFF
void delay(unsigned int n) // Delay function
{
unsigned int i,j;
for(i=0;i<n;i++)
{
for(j=0;j<2000;j++) {;}
}
}
int main() // Main function
{
GPIO3_DR = LED; // P3.0 to P3.7 set as output Direction
GPIO3_OR |= LED; // P3.0 to P3.7 set as High
delay(50);
GPIO3_OR &= ~LED; // P3.0 to P3.7 set as Low
delay(50);
}

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.