Notes 1
Notes 1
Notes 1
#include<lpc214x.h>
{
unsigned int delay1,j;
EXTMODE =0x01; //edge i.e falling edge trigger and active low
EXTPOLAR= 0X00;
VICVectCntl0 = 0x20 | 14; //Assign the VIC channel EINT0 to interrupt priority 0
count = 0x00000000;
#include<lpc214x.h>
int main(void)
{
unsigned int delay1;
PINSEL1 = 0X00000000;//SET P0.16 AS GPIO PIN
EXTMODE =0x01; //edge i.e falling egge trigger and active low
EXTPOLAR= 0X00;
VICVectCntl0 = 0x20 | 14; //Assign the VIC channel EINT0 to interrupt priority 0
}
}
IO0CLR = 0X00010000;
int main(void)
{
unsigned int in_data;
unsigned int temp;
in_data = 0x2FF;
DACR = temp;
for(;;);
}
#include <LPC214X.H>
/*****************ADC Functions***************/
//AD0.3 or P0.30 will be used in this program
int main(void)
{
unsigned int adc_data;
unsigned int i;
IO0DIR = 0X000003FF;
/*************Initialize ADC AD0.4*************/
PINSEL0 = 0x00000000;
while(1)
{
//POWER UP THE ADC FROM SLEEP MODE
AD0CR |= 1<<21;
//START CONVERSION
AD0CR |= 1<<24;
//STOP CONVERSION
AD0CR |= 0<<24;
IO0CLR = 0XFFFFFFFF;
IO0SET = adc_data;
for(;;); //wait before next conversion
}
}