This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*Programming on chip flash driver -- copy data from RAM to Flash/Erasing Sector address, Erasing complete chip and programming the chip with IAP [In Application Program] commands*/ | |
| /* Reference Manual for Flash memory and IAP commands :http://www.nxp.com/documents/user_manual/UM10139.pdf */ | |
| #include ''../FlashOs.H" | |
| // Memory Mapping Control | |
| #define MEMMAP (*((volatile unsigned char *) 0x E01FC040)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| This experiment is testing output port function of LPC2148 to drive 2 LED at P0.21 and P0.22 | |
| //——————————————————————————————————————————————————————————————————// | |
| // Program : Example for display LED | |
| // Description : LED Blink toggle at P0.21 and P0.22 | |
| // Frequency : Crystal 12 MHz at PLL 5x(CCLK = 60 MHz),PCLK = 30 MHz | |
| // Filename : led.c | |
| // C compiler : Keil CARM Compiler | |
| //——————————————————————————————————————————————————————————————————// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <LPC214x.H> /* LPC21xx definitions */ | |
| #define IOPIN1 (*((volatile unsigned long *) 0xE0028010)) | |
| #define IOSET0 (*((volatile unsigned long *) 0xE0028004)) | |
| #define IOCLR0 (*((volatile unsigned long *) 0xE002800C)) | |
| #define IODIR0 (*((volatile unsigned long *) 0xE0028008)) | |
| #define IODIR1 (*((volatile unsigned long *) 0xE0028018)) | |
| #define LED_IO_DIR IODIR0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /************Main Function*****************/ | |
| #include <lpc214x.h> | |
| #include "ext_int.h" | |
| int main(void) { | |
| keypad_init(); //// initialize the keypad in interrup mode | |
| while(1) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /***Main Program **********/ | |
| #include <stdio.h> | |
| #define MAX 5 | |
| int status,top; | |
| int push(int stack[],int item) | |
| { | |
| if (top == MAX-1) | |
| { | |
| printf("Stack overflow \n"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #incluyde <ctype.h> | |
| #define SIZE 50 | |
| char s[SIZE]; | |
| int top =-1; | |
| push(char elem) | |
| { | |
| s[++top] = elem; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| This Program is for queue implementation using arrays in C. | |
| #include <stdio.h> | |
| #define N 6 | |
| int queue[N] = {0}; | |
| int rear = 0,front = 0; | |
| void insert(void); | |
| void delete(void); | |
| void display(void); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| int main() | |
| { | |
| int s,temp,i,j,a[20]; | |
| printf("Enter total no. of elements:"); | |
| scanf("%d",&s); | |
| printf("Enter %d elements:",s); | |
| for(i=0;i<s;i++) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Program is to find the "String matching pattern from source string". | |
| #include <stdio.h> | |
| #include <string.h> | |
| int match(char[],char[]); | |
| int main() | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| This program is for sequential search | |
| #include <stdio.h> | |
| int main() | |
| { | |
| int key[20],i,s; | |
| int key1; | |
| printf("Enter the no. of elements:\n"); | |
| scanf("%d",&s); |