#includeLPC11xx.h#includeadc.h#includeuart.hexternvolatileuint32_tADCValue;externvolatileuint32_tADCIntDone;externvolatileuint32_tUARTCount;externvolatileuint32_tUARTBuffer[10];uint8_tConvertDigital(uint8_tdigital){uint8_tascii_char;if((digital='A')&&(digital='F')){ascii_char=digital-0x0A;ascii_char+=0x41;}else{ascii_char=digital+0x30;}return(ascii_char);}intmain(void){uint32_ti;SystemInit();UARTInit(115200);ADCInit(ADC_CLK);while(1){ADCValue=ADCRead(1);LPC_UART-IER=IER_THRE|IER_RLS;UARTBuffer[0]=ConvertDigital((uint8_t)(ADCValue28));UARTBuffer[1]=ConvertDigital((uint8_t)(ADCValue24)&0xF);UARTBuffer[2]=ConvertDigital((uint8_t)(ADCValue20)&0xF);UARTBuffer[3]=ConvertDigital((uint8_t)(ADCValue16)&0xF);UARTBuffer[4]=ConvertDigital((uint8_t)(ADCValue12)&0xF);UARTBuffer[5]=ConvertDigital((uint8_t)(ADCValue8)&0xF);UARTBuffer[6]=ConvertDigital((uint8_t)(ADCValue4)&0xF);UARTBuffer[7]=ConvertDigital((uint8_t)ADCValue&0xF);UARTBuffer[8]='\r';UARTBuffer[9]='\n';UARTSend((uint8_t*)UARTBuffer,10);LPC_UART-IER=IER_THRE|IER_RLS|IER_RBRfor(i=0;i0x888888;i++);}}#includeLPC11xx.h#includelpc_types.h#includeLPC11xx_clkpwr.h#includeLPC11xx_gpio.hintmain(void){unsignedinti;GPIO_SetDir(0,4,1);GPIO_SetDir(0,5,1);GPIO_SetDir(0,6,1);GPIO_SetDir(0,7,1);while(1){GPIO_SetValue(0,4,0);GPIO_SetValue(0,5,1);GPIO_SetValue(0,6,1);GPIO_SetValue(0,7,1);for(i=0;i0xFFFF;i++);GPIO_SetValue(0,4,1);GPIO_SetValue(0,5,0);GPIO_SetValue(0,6,1);GPIO_SetValue(0,7,1);for(i=0;i0xFFFF;i++);GPIO_SetValue(0,4,1);GPIO_SetValue(0,5,1);GPIO_SetValue(0,6,0);GPIO_SetValue(0,7,1);for(i=0;i0xFFFF;i++);GPIO_SetValue(0,4,1);GPIO_SetValue(0,5,1);GPIO_SetValue(0,6,1);GPIO_SetValue(0,7,0);for(i=0;i0xFFFF;i++);}}#includeLPC11xx.h#includetimer32.h#includegpio.hexternvolatileuint32_ttimer32_1_counter;intmain(void){SystemInit();init_timer32(1,TIME_INTERVAL);enable_timer32(1);LPC_SYSCON-SYSAHBCLKCTRL|=(16);GPIOSetDir(2,0,1);GPIOSetDir(2,1,1);while(1){if((timer32_1_counter0)&&(timer32_1_counter=50))GPIOSetValue(2,0,0);elseGPIOSetValue(2,0,1);if((timer32_1_counter0)&&(timer32_1_counter=75))GPIOSetValue(2,1,0);elseGPIOSetValue(2,1,1);if(timer32_1_counter100)timer32_1_counter=0;}}