![]() |
|
|||||||
| Programmer's Corner Discussion forum for all aspects of programming and software engineering. Any software programming language welcome: C, C++, C#, Fortran, Java, Matlab, etc. |
|
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
Does anybody know how to program LPC1343 adc? Knows how any good tutorials for LPC1300 or for ARM cortex3 ? I have a code but I do not know what is wrong? #ifdef __USE_CMSIS //#define LED_PORT 0 // Port for led //#define LED_BIT 7 // Bit on port for led #include "LPC13xx.h" #endif void ADC_IRQHandler (void) { LPC_GPIO0->DATA=(1<<7); //turn on LED } int main(void) { LPC_SYSCON->SYSAHBCLKCTRL |= (1<<13); // ADC clock enable LPC_ADC-> CR |= (1<<0); //select ADC channel AD0 LPC_ADC-> CR |= (0<<8); // CLKDIV divide from 1 4.5MHZ LPC_ADC-> CR |= (1<<24); // START conversation now //LPC_ADC->DR0 |= (1<<24); // LPC_ADC-> INTEN |= (1<<0); // Enable interupt LPC_ADC-> INTEN|=(1<<8); //enables the global done flag to generate interrupt NVIC_EnableIRQ( ADC_IRQn); LPC_GPIO0->DIR=(1<<7); LPC_GPIO0->DATA=0; // Enter an infinite loop, just incrementing a counter while(1) { } return 0 ; } |
|
| Bookmarks |
| Tags |
| board, lpc1343, programming |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need Help with Interface Board Design | mightymike | The Projects Forum | 11 | 04-02-2010 09:49 PM |
| Help in using Matlab to programming DSP Board | mostafa ahmed | Embedded Systems and Microcontrollers | 0 | 10-03-2009 06:21 PM |
| Programming multiple ATTiny25s sequentially | Twerpling | Embedded Systems and Microcontrollers | 1 | 06-02-2009 12:02 PM |
| Programming a pic18f2525 without a dev board | dasandru | Embedded Systems and Microcontrollers | 1 | 02-05-2009 07:29 PM |