All About Circuits Forum  

Go Back   All About Circuits Forum > Software, Microcomputing, and Communications Forums > Programmer's Corner

Notices

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.

Reply   Post New Thread
 
Thread Tools Display Modes
  #1  
Old 03-01-2010, 09:50 PM
Irmutis Irmutis is offline
Junior Member
 
Join Date: May 2009
Posts: 11
Default LPC1343 programming board

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 ;

}
Reply With Quote
Reply   Post New Thread

Bookmarks

Tags
, ,

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT. The time now is 10:22 PM.


User-posted content, unless source quoted, is licensed under a Creative Commons Public Domain License. Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.