Content originally posted in LPCWare by Jantje7600 on Sun Nov 23 03:50:42 MST 2014
Thanks, I have read it quickly another day. It is something like a library which has examples I guess...
Below is a snippet of adc.c
NVIC_DisableIRQ(DMA_IRQn);
NVIC_SetPriority(DMA_IRQn, ((0x01 << 3) | 0x01));
NVIC_EnableIRQ(DMA_IRQn);
/* Setting ADC interrupt, ADC Interrupt must be disable in DMA mode */
NVIC_DisableIRQ(_LPC_ADC_IRQ);
Chip_ADC_Int_SetChannelCmd(_LPC_ADC_ID, _ADC_CHANNLE, ENABLE);
/* Get the free channel for DMA transfer */
dmaChannelNum = Chip_GPDMA_GetFreeChannel(LPC_GPDMA, _GPDMA_CONN_ADC);
/* Enable burst mode if any, the AD converter does repeated conversions
at the rate selected by the CLKS field in burst mode automatically */
if (Burst_Mode_Flag) {
Chip_ADC_SetBurstCmd(_LPC_ADC_ID, ENABLE);
I know how to program in C but if I see the code above then I don't know what all that microcontroller stuff means. Arduino is very easy and there are good books about it but I simply don't know where to start to become profound with arm programming (in C)... I want a good tutorial from A to Z or a book