Hello guys,
First of all, I am new on ARM7,
Are there any library for LPC2368, like something on ATMEGA32, (delay.h , LCD.h ) or...
For example for using PWMs, instead of using the registers directly, We use some of functions that is included in a library and in this way, We can use that functions instead of a lot of HEX numbers and name of registers. It is really awful to program a micro using the machine language!
Sincerely yours, Pooriya
Yes, I have looked to the NXP site, But found nothing, I am in the middle of a project and I can't change the project definition, So it would not be possible to use LPC1768,
Guys, I really need your help, programming a micro using its language is killing me!
Please HELP, HELP, HELP...
Dears,
I can't understand the BUNDLE codes, Would you guys tell me if I am right or not on below:
for example on below code to set the cycle of PWM it is only enough to replace my desired cycle with cycle word on below codes?
void PWM_Set( DWORD ChannelNum, DWORD cycle, DWORD offset ) { if ( ChannelNum == 0 ) { PWM0MR0 = cycle; /* set PWM cycle */ PWM0MR1 = cycle * 5/6 + offset; PWM0MR2 = cycle * 2/3 + offset; PWM0MR3 = cycle * 1/2 + offset; PWM0MR4 = cycle * 1/3 + offset; PWM0MR5 = cycle * 1/6 + offset;
/* The LER will be cleared when the Match 0 takes place, in order to load and execute the new value of match registers, all the PWMLERs need to reloaded. all PWM latch enabled */ PWM0LER = LER0_EN | LER1_EN | LER2_EN | LER3_EN | LER4_EN | LER5_EN | LER6_EN; } else if ( ChannelNum == 1 ) { PWM1MR0 = cycle; /* set PWM cycle */ PWM1MR1 = cycle * 5/6 + offset; PWM1MR2 = cycle * 2/3 + offset; PWM1MR3 = cycle * 1/2 + offset; PWM1MR4 = cycle * 1/3 + offset; PWM1MR5 = cycle * 1/6 + offset;
/* The LER will be cleared when the Match 0 takes place, in order to load and execute the new value of match registers, all the PWMLERs need to reloaded. all PWM latch enabled */ PWM1LER = LER0_EN | LER1_EN | LER2_EN | LER3_EN | LER4_EN | LER5_EN | LER6_EN; } return; }
LPC23xx and LPC17xx have almost identical hardware functionality. The LPC17xx series is a tiny bit big brother, i.e. a number of peripherial hardware have some extra mode bits with some extensions relative to LPC23xx.
But the important thing is that it is useful to look at code that runs on the LPC17xx to get ideas for how to do things on a LPC23xx chip.
Another thing - a LPC1768 is pin compatible with a LPC2368 so even if far into a project it may still be possible to switch. LPC17xx is normally the processor family to select if starting new projects anyway.
So why are you doing a microcontroller project, then?!
Wasn't it obvious at the outset that a microcontroller project would require you to program the microcontroller?!