LPCXpresso instruction syntax

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPCXpresso instruction syntax

1,423 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tinto on Mon Jan 09 03:19:05 MST 2012
From where can I find the complete syntax for the instructions used in LPCXpresso?
0 Kudos
Reply
6 Replies

1,325 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by james on Sun Jan 15 21:41:01 MST 2012
I read the lpc_17xx.h to got myself more familiarized.
0 Kudos
Reply

1,325 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tinto on Tue Jan 10 21:57:38 MST 2012
Thank you very much. I will try to learn from the examples.
0 Kudos
Reply

1,325 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Rob65 on Tue Jan 10 15:32:19 MST 2012
There are no "instructions" to initiate PWM, Timer etc.

The peripherals are all programmed via register access.

Example (for lpc1769):
LPC_GPIO0->FIODIR |= 1<<22; /* Set P0.22 as output */
LPC_GPIO0->FIOSET = 1<<22;  /* Set P0.22 (LED is on) */
LPC_GPIO0->FIOCLR = 1<<22;  /* Clear P0.22 (LED is off) */
This shows how to set a GPIO bit as output and how to set and clear the bits.
You need to be able to read and understand the user manual, in there it is stated what the different registers in a peripheral do.

Luckily there are enough samples to show you how to use the more complex peripherals. Things like a UART, PWM, Timer or GPIO port are easy to grasp but things like I2C or CAN may be more difficult.

If you go to the NXP website (ics.nxp.com) and enter the name of the controller (e.g. lpc1343) in the "ICs quick find" you will get a list of documents and videos that push you a bit in the proper direction.

Rob
0 Kudos
Reply

1,325 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by dragilla on Tue Jan 10 03:46:51 MST 2012
I know what you mean and I'm afraid there is no such thing :(
You can learn from the examples contained in the cmsis 1.3 library.
0 Kudos
Reply

1,325 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tinto on Mon Jan 09 20:48:50 MST 2012
I have already went through the getting started guide and user's manual. But there is only assembly instructions. I need to program in C.I need the instructions to initiate timer, PWM, set their frequency, enable ADC etc.
0 Kudos
Reply

1,325 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Rob65 on Mon Jan 09 16:17:57 MST 2012

Quote: tinto
From where can I find the complete syntax for the instructions used in LPCXpresso?



There is this nice book called "The C Programming Language" :eek:

Furthermore, when you start the LPCXpresso tools you will see the welcome screen with links guiding you to the getting started guide, NXP's LPCXpresso pages (including the user manuals for the different chips) and some more info.

If you want to program in assembly, you'll have to look at the website from ARM for the instruction set.

Regards,[INDENT]Rob
[/INDENT]
0 Kudos
Reply