I have two example that were generated from my applicatopn
Flashing leds using the four timer interrupts , 100ms, 200ms, 400ms, 800ms
A simple example that uses the GPIO group and pin interrupts.
LED1 turns on when P21 and P22 are grounded (using group 0 interrupt)
LED1 turns of when P23 or P24 are grounded (using group 1 interrupt)
LED2 turns on when P19 is grounded (using GPIO interrupt 0)
LED2 turns off when P18 is grounded (using GPIO interrupt 1)
First of all you have to add the extern "C" in front of the interrupt handlers in your code like I din in my examples , I don't think there is a way to avoid that with the online compiler.
I had trouble making the code compile using the LPC11Uxx.h header because there were the startup and core/system files that needed to be added so I replaced the header with mbed.h and the code worked fine.
I'm sure it will work too with LPC11Uxx.h if some system libraries are added but I didn't bother much and used the mbed instead.
My application doen't have UART initialization yet but if you do it using regiters and not function from a library then you don't need to add anything.
Note that sooner or later you will need to add so me library , for example LCD driver or something but this shouldn't be a problem, just add the library to the project.
Alex
Greatings,
I want to programme my mbed without the mbed library just for the fun of it and to learn how it goes. My starting point is the code examples of keil for the 11Uxx that I found here : http://www.lpcware.com/content/nxpfile/sample-code-bundle-lpc11uxx-peripherals-using-keils-mdk-arm-0
I tried the following blinky code at first :
I compiled it but it does not seem to work. I tried to change the pin in the code and other things but it seems like it is not so easy.
Is it possible to compile this code with the online compiler of mbed and to upload it on my board? Or am I missing somthing?
Any hint?
thanks.