این برنامه با ارورش نمی دونم چرا ارور در مورد فرکانس می ده
#include "lpc17xx.h"
#include "lpc17xx_clkpwr.h"
#include "lpc17xx_pinsel.h"
#include "lpc17xx_adc.h"
#include "lpc_types.h"
#include "lpc17xx_libcfg_default.h"
int main()
{
int a;
LPC_PINCON->PINSEL3 |= (3UL<<30); /* P1.31 is AD0.5 */
ADC_Init(LPC_ADC,200000);
while(1)
{
ADC_ChannelCmd(LPC_ADC,5,1);
ADC_StartCmd(LPC_ADC,ADC_START_NOW);
a = ADC_ChannelGetData(LPC_ADC,5);
a/=3;
}
}
#include "lpc17xx.h"
#include "lpc17xx_clkpwr.h"
#include "lpc17xx_pinsel.h"
#include "lpc17xx_adc.h"
#include "lpc_types.h"
#include "lpc17xx_libcfg_default.h"
int main()
{
int a;
LPC_PINCON->PINSEL3 |= (3UL<<30); /* P1.31 is AD0.5 */
ADC_Init(LPC_ADC,200000);
while(1)
{
ADC_ChannelCmd(LPC_ADC,5,1);
ADC_StartCmd(LPC_ADC,ADC_START_NOW);
a = ADC_ChannelGetData(LPC_ADC,5);
a/=3;
}
}
دیدگاه