ARM LPC2138/48 Mini Development Board – LED Interfacing
LPC 2138/48 mini development board has 3 SMD LED s connected to port pins P0.17, P0.18 & P0.19 via jumpers J1 , J2 & J3. If any jumper is left open, then the corresponding port pin can be used independently. The sample code given below toggles the LEDs in fixed intervals.
SchematicNote: To use the LEDs, don’t forget to short the corresponding jumpers J1, J2 & J3. Leaving them open frees P0.17, P0.18 & P0.19 and can be used for any other desired purpose.
Sample Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
/************************************************************************* HEADER FILE **************************************************************************/ #include<lpc21xx.h> /************************************************************************* * Function : Delay * * * * Description : Function for delay * * * * Parameter : val - the value for delay * **************************************************************************/ void Delay(unsigned long val) { while(val>0) { val--; } } /************************************************************************* MAIN FUNCTION **************************************************************************/ int main() { IO0DIR = 0XFFFFFFFF; /* Set Port0 as output */ while(1) /* Infinite loop */ { IO0SET = 0X000E0000; /* Set P0.17,P0.18,P0.19 at logic high state */ Delay(1000000); /* Delay of 100ms */ IO0CLR = 0X000E0000; /* Set P0.17,P0.18,P0.19 at logic low state */ Delay(1000000); } } /*************************** END OF PROGRAM ****************************/ |
Topics related to ARM LPC2138/48 Mini Development Board
- ARM LPC2138/48 Mini Development Board – Overview
- ARM LPC2138/48 Mini Development Board – LED Interfacing
- ARM LPC2138/48 Mini Development Board – LCD Interfacing
- ARM LPC2138/48 Mini Development Board – UART0 Interfacing
- ARM LPC2138/48 Mini Development Board – UART1 Interfacing
- ARM LPC2138/48 Mini Development Board – Switches Interfacing
- ARM LPC2138/48 Mini Development Board – BUZZER Interfacing
- ARM LPC2138/48 Mini Development Board – POT Interfacing (ADC)
- ARM LPC2138/48 Mini Development Board – Temperature Sensor Interfacing(ADC)
- ARM LPC2138/48 Mini Development Board – Interfacing Servo motor
- ARM LPC2138/48 Mini Development Board – Internal Real Time Clock (RTC)
- ARM LPC2148 Mini Development Board – USB Interfacing (Human Interface Device)
Resources
- Softwares
- Datasheets
How to buy?
- Click here to buy rhydoLABZ ARM LPC2129 Development board-Mini
- Click here to buy rhydoLABZ ARM LPC2138 Development Board-Mini
- Click here to buy rhydoLABZ ARM LPC2148 Development Board-Mini
Support
Please share your ideas with us, visit our forum for discussion
Leave a Reply
You must be logged in to post a comment.