LPC810 mini ARM Prozessor in 8 pin dip package

Meanwhile back at the IDE, I installed the latest version (7.3.0) and have spent half the day getting my previous projects to compile.

Did I mention that I hate dicking with tool chains? :slight_smile:

Anyway all seems to work now.

I have installed EGit and tried to grab the repo but it asked me too many damn questions and by that time I'd had a gut full.


Rob

Hey this topic looks very interesting. I've written a Simon Says game for the LPC810 under the LPCXpresso IDE and I'm very curious to port my code to the Arduino IDE.

I've written a Simon Says game
Hi hwhardsoft,
I saw your program before. It is quite nice. Because I was looking for some way to produce sound, I found your project.
If you want it should be easy to write your code arduino compatible.
There is a sound function
OpenLasp/example05_toneMelody.ino at master · bobc/OpenLasp · GitHub

And the Button functions are working also:

At the moment I'm experimenting with some none square wave sounds:

Greynomad wrote:

Did I mention that I hate dicking with tool chains? smiley

I can understand that. Yesterday I was fighting to set up the tool chain for the Arduino IDE.
But you shouldn't give up. It is really good to have Git inside Eclipse.

@bob:
In the current version of your repo is a problem for the LPC8: it runs only half speed. This is bad because the serial port is not working as expected.
Somewhere in the initialization must be an error.
In my repo it is running with the desired speed:

Just a note for members who want to play around with the LPC810 but are not ready to move into the Arduino GUI environment and muck around...

Adafruit sells the LPC810 for too much, but the write-up on using the default (free) tool chain is pretty good and will get one started without messing up their Arduino environment. Later, if they decide to continue, they can move to the 1.5.x environment and use the new library.

Good luck, y'all. I've been playing around with the ARM PSoC 4200 for about 3 months and am just now getting comfortable not working in C++. I've flattened a few C++ libs to work with the PSoC Creator which uses the GCC toolchain, but defaults to C. Defaulting to C++ is supported (google it) but since I was only playing with the hardware and not too concerned about the ARM, I really did not go down that road.

Ray

PSoC experiences here: http://www.hackster.io/rayburne

I got the PSoC dev system on DVD a while back but just have too much to learn as it is so it's still in the drawer. Nice stuff though.


Rob

Graynomad:
I got the PSoC dev system on DVD a while back but just have too much to learn as it is so it's still in the drawer. Nice stuff though.


Rob

Of course, right now Cypress is running the 4200 PSoC at unit quantities of $1 each until the end of the month:

Personally, I have been using the $4 dollar 4200 Prototype board: http://www.cypress.com/?rID=92146
and the 4200 Pioneer board: http://www.cypress.com/?rID=77780

Why the $25 Pioneer board? Because the GUI will allow full register level debugging, breakpoints, etc!
You do not get debugging on the $4 board.

My personal experience has been favorable but somewhat frustrating and primarily along the lines that it takes way too much effort for the hobbyist ("joe arduino") to use this technology. The PSoC learning curve is steep... you will waste 30 days watching videos, digging through datasheets (IF PDFs were trees, PSoC would leave the Earth barren), and watching videos. Yes, much of the information is only available through video training. I was able to do most of my projects in the 2nd month and was comfortable with the GUI by the end of the 3rd month. My trip was a self-imposed, educational trek... Been there, done that (now.)

Ray

For those unfamiliar with the PSoC:

LCD Direct Drive Yes
No. of Op Amps 2
CPU Core ARM Cortex-M0
Max. Operating Frequency (MHz) 48
Automotive Qualified N
CapSense Yes
Min. Operating Voltage (V) 1.71
Max. Operating Voltage (V) 5.50
Min. Operating Temp. (°C) -40
Max. Operating Temp. (°C) 85
No. of Dedicated Comparators 2
No. of GPIOs 36
SRAM (KB) 4
No. of Dedicated Timer/Counter/PWM Blocks 4
No. of CAN Controllers 0
No. of Serial Communication Blocks 2
No. of Universal Digital Blocks 4
Dedicated ADC (#Max Resolution @ Sample Rate) SAR (1, 12-bit @ 1 msps)
Flash (KB) 32

Adafruit sells the LPC810 for too much, but the write-up on using the default (free) tool chain is pretty good and will get one started >without messing up their Arduino environment.

Ähhmm ... in this thread we are not messing up the Arduino environment.
We are now in a stage where you only copy two folders in the Arduino-Sketch-Folder and it works. Thats it. You can compile and donwload the examples.

Graynomad:
I have installed EGit and tried to grab the repo but it asked me too many damn questions and by that time I'd had a gut full.

With github if you just want to download a copy of a repo without faffing with git, there is always the option to grab a zip snapshot using the Download Zip button.

In this case the link is https://github.com/bobc/OpenLasp/archive/master.zip

ChrisMicro:
@bob:
In the current version of your repo is a problem for the LPC8: it runs only half speed. This is bad because the serial port is not working as expected.
Somewhere in the initialization must be an error.
In my repo it is running with the desired speed:
GitHub - ChrisMicro/LPC810_CodeBase: Open source code base for the ARM Cortex M0+ LPC810 family from NXP

It looks like SystemInit was not being called! Due to missing compiler flag. There may be some other flags I missed.
I also added in some changes from your LPC810CodeBase repo, and moved the tone.cpp files to the cores/lpc810, I didn't realise they are standard Arduino functions.

I have pushed the changes to my OpenLasp repo.

In your LPC810CodeBase you have a makefile and an eclipse project, they seem to be slightly different. I was working from the makefile verson, but I think that does not support C++. I suspect that we will need to use cr_startup_lpc8xx instead of gcc_startup_lpc8xx to get C++ initializers called. I'm not sure why there are two different startup files.

ChrisMircro wrote

Somewhere in the initialization must be an error.In my repo it is running with the desired speed:
Bob wrote:
It looks like SystemInit was not being called! Due to missing compiler flag. There may be some other flags I missed.

I found a workaround, it is the missing __USE_CMSIS:

Ah, ok, I was missing that you have already merged the changes.

I suspect that we will need to use cr_startup_lpc8xx instead of gcc_startup_lpc8xx to get C++ initializers called. I'm not sure why >there are two different startup files.

I have also no idea about that because I just used it as it came from "microbuilder".

But I have another question for the

LPC810 EXPERTS

in this forum:
For a clean sound generation a 30kHz PWM interrupt would be needed.
But I didn't succeed with that. When I enable the interrupt, the PWM hangs up after some cycles.
The code is here:

Yay! Finally an LPC810 arrived in the post.

Unfortunately, I have been unable to get flushmagic.py to work on Windows. However, lpc21isp works fine, and as that is generally a better solution for Windows, I propose to use lpc21isp instead.

It might be better to use it on Unix too, what do you think?

I gather lpc21isp is software, what actually does the programming? Or is it just for dev boards that already have programming hardware in place?


Rob

Graynomad:
I gather lpc21isp is software, what actually does the programming? Or is it just for dev boards that already have programming hardware in place?

Most (maybe all?) of the NXP ARM chips have a bootloader in ROM which runs an ASCII protocol over UART, so the great thing is you don't need any programming hardware apart from a USB-TTL adapter.

The ASCII protocol is dead simple, you could almost drive it with a terminal emulator. Basically all lpc21isp does is read the bin file and send data formatted as ASCII hex to the chip, and the chip programs itself.

I've now got blinky running on a breadboard with 3 components: led, resistor and LPC810, programmed through Arduino IDE. It's really a great chip for hobbyists - hopefully NXP will continue making it!

NXP had the LPC1114 DIP package down for end-of-life which they have rescinded, not sure whether that was a mistake or if the DIP packages are not selling much.

In principle, any ARM chip that has a built-in bootloader accessible over serial should be easy to incorporate into Arduino IDE.

Yay! Finally an LPC810 arrived in the post.

Great. I'm curious what nice little Arduino programs you are making with it.

Unfortunately, I have been unable to get flushmagic.py to work on Windows. However,
lpc21isp works fine, and as that is generally a
better solution for Windows, I propose to use lpc21isp instead.

Oh, that's a pity. The advantage of "flushmagic.py" is, that you can alter the code.
I had to do it for my Arduino programmer:

This programmer works very comfortable because it automatically resets the LPC810 and pulls the ISP-line at the start of programming and when it finishes, it reset the LPC810 again to start the program. The development flow is exactly the same as with an Arduino Uno: just press the button than the program compiles, downloads and starts. All in all very comfortable.

That this process is working, I had to modify "flushmagic.py" a little bit and introduce a delay at "flushmagic.py" start because the LPC810 needs a little time to recover from reset.

I don't understand why it is not working on windows. Python brings the serial-library and I think this library should also work on windows. The program itself does not look very resource challenging.

ChrisMicro:
Great. I'm curious what nice little Arduino programs you are making with it.

It's a bit small for my usual projects, but I would like to port the OpenBlink firmware to it.

Oh, that's a pity. The advantage of "flushmagic.py" is, that you can alter the code.
I had to do it for my Arduino programmer:
hobby-roboter.de
This programmer works very comfortable because it automatically resets the LPC810 and pulls the ISP-line at the start of programming and when it finishes, it reset the LPC810 again to start the program. The development flow is exactly the same as with an Arduino Uno: just press the button than the program compiles, downloads and starts. All in all very comfortable.

I didn't spend much time debugging flushmagic, but I never got past the initial synchronize.

Of course, lpc21isp can be modified too, it's an open source project GitHub - capiman/lpc21isp: lpc21isp - Portable command line ISP for Philips LPC family and Analog Devices ADUC70xx

A big disadvantage of a python script is that it creates an additional dependency on python being installed (and then pyserial) most users will not have it. It also awkward to call the python script file via a batch file, a native program is much better. We can also use lpc21isp for other NXP chips.

I think if there is a need for script type operations then it would be best to write them in Java, as that must be there to run Arduino IDE.

Most (maybe all?) of the NXP ARM chips have a bootloader in ROM which runs an ASCII protocol over UART, so the great thing is you don't need any programming hardware apart from a USB-TTL adapter.

Yes, silly me, I forgot about the ROM-based bootloaders. I think you can even do drag-n-drop onto the chip if you use the USB mass storage option. That's something I need to investigate although I admit I've never been a great fan of drag-n-drop because it requires mouse movements, but maybe that can be automated as a simple copy.

I was very keen on the LPC11U68 but now I think I'm in love, I've been reading up on the LPC1549 and what a great chip that seems to be. Not as many serial ports as the U68 but an M3 and a lot of other nice features.

The SWM (pin switch matrix) is fantastic, it allows most functions to be MUXed to most pins, and I almost wet myself when I found that there's a Tx idle interrupt on the USARTs :slight_smile:


Rob

A big thank to ChrisMicro

I just got my LPC810 and had a working blinky almost without trouble.
Here is the procedure I used
Download Arduino 1.5.7
Download Chris's zip-file from post #1
From that download copy LPC8 folder and tools folder to: Arduino/hardware/arduino

I use a 3v3 usb/serial converter so that can be directly connected to the chip so next steps:

Disconnect the power from the chip and connect pin 5 to ground to go into programming mode
Compile and upload the sketch.
Disconnect power and pin 5 from ground
Reconnect the power, and the sketch should start

I was a little confused about the pin numbers but they are here:

http://vilaca.eu/lpc810/

BTW you have to have python and Flasmagic istalled too (used for the upload)

My OS is Windows Vista

A big thank to ChrisMicro

Hi Erni, thank you very much. I'm very please to hear that someone is using it.
I'm very curious what kind of projects the people are implementing with the LPC810.

I also want to thank bob cousins for his affords to maintain the repo.