Arduino Forum

Using Arduino => Microcontrollers => Topic started by: ChrisMicro on Sep 16, 2014, 11:16 am

Title: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: ChrisMicro on Sep 16, 2014, 11:16 am
There is a little ARM-microcontroller in a 8 pin dip package.

Here I started to write a Arduino-Lib in C to make it easier to use this powerful and cheap chip:

http://hobby-roboter.de/forum/viewtopic.php?f=4&t=152

The chip itself can be programmed by a serial line. I used an old Arduino-Diecimilla on which I removed the Atmega8 and used it as an USB to serial converter. It is only neccessary to connect a Resistor to GND on the Rx line of the LPC810 because it uses 3.3V.

Have fun,
chris
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: ChrisMicro on Sep 16, 2014, 12:21 pm
For now, the following functions are implemented and working:

void pinMode(uint8_t pin, uint8_t mode);
void digitalWrite(uint8_t pin, uint8_t value);
void digitalToggle(uint8_t Pin);
int digitalRead(uint8_t pin);
void delay(uint32_t milliSeconds);
void Serial_begin(uint32_t baudRate);
void Serial_print(char * string);
void Serial_println(char * string);
void Serial_printnumber(uint32_t number);
uint32_t millis();
uint16_t analogRead(uint8_t channel );
int32_t map(int32_t x, int32_t in_min, int32_t in_max, int32_t out_min, int32_t out_max);
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: graynomad on Sep 16, 2014, 12:46 pm
Nice job from what I can see.

I'm a big fan of the LPCs and have also done an Arduino port (to the 1227). I too used C rather than C++ because at the time the C++ compiler cost $256. It's now free and I have a rewrite on my todo list.

______
Rob
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: ChrisMicro on Sep 16, 2014, 03:25 pm
Hi Rob,

thank you for your response.
>I too used C rather than C++ because at the time.
You are rigth, C++ is better because the commands can be made more compatible to the original.
Using my lib you would have to write

Serial_begin(9600);

instead of

Serial.begin(9600);

and it is not "polymorphic" that the arguments can have different types.
The reason why I did it in this way is that I couln't find an easy to install C++ compiler for my Ubuntu 12.04 and I didn't want to put to much time in installing the development system.
There was only a precompilde C compiler

https://launchpad.net/~terry.guo/+archive/ubuntu/gcc-arm-embedded

so I used C.

And I'm not shure if C is using less memory because the space is very limited on the LPC810.

>I'm a big fan of the LPCs and have also done an Arduino port (to the 1227).

Du you have a link to your code? Probably it would be a nice idea to port it to a LPC1114FN28.
It has a 28 pin dip package.



Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: graynomad on Sep 16, 2014, 03:45 pm
I have a couple of pages describing the API here

http://lard.robgray.com/index.php (http://lard.robgray.com/index.php)

I haven't done anything with this for maybe a year two years. The source is in a Git repo somewhere, it's not even at alpha state and not really for public consumption but if you want to have a look I can find the URL.

______
Rob
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: bobcousins on Sep 16, 2014, 08:27 pm

There was only a precompilde C compiler

https://launchpad.net/~terry.guo/+archive/ubuntu/gcc-arm-embedded

so I used C.


GCC includes a C++ compiler!

The LPC chips are good, I have done a few projects with them. I've mostly used free tools, though I did pay for a license for a vendor neutral tool to get JTAG debugging, but TBH it was not great value for money.

The ARM vendors seem to be competing by offering free IDEs, which is a great for us. Arduino everywhere!
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: ChrisMicro on Sep 16, 2014, 09:28 pm
>GCC includes a C++ compiler!
uuuh ... I thought it is
arm-none-eabi-g++
I tried to compile C++ code with the make file included in my library:
http://hobby-roboter.de/forum/download/file.php?id=191
but I was not successful. I'm not good in creating make-files therefore I gave it up to compile C++ and used C instead.
But if anyone can rework the make-file for C++ it would be usefull.

BTW.: would it be possible to use the Arduino IDE ( for Arduino DUE ) to compile the code for the LPC810 ?
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: graynomad on Sep 17, 2014, 01:37 am
It always was possible to use C++ if you were happy to dick around with makefiles, I even think you could still use the IDE, but that was too much like hard work for me so I use the LPCXpresso environment and dev boards, really simple almost turnkey operation.

I haven't looked at the LPC range for a while, I just noticed the new LPC11U68, what a great chip and there's a Xpresso dev board for it with Arduino headers.

I may revisit my LARD framework with a view to converting to C++ and getting it running on this and also smaller chips like the LPC1114FN28 you mentioned Chris. It's a bit heavy on resources though, dunno if it will fit, I'll check out that chip now.

Meanwhile I'm grabbing the latest LPCXpresso IDE.

______
Rob
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: bobcousins on Sep 17, 2014, 02:16 am
It was always possible to build C++ code for ARM using Eclipse and the embedded plugin, no dicking around with makefiles required :)

You can't beat the vendor tools for ease of use though, as long as you don't mind being locked into their parts.



Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: graynomad on Sep 17, 2014, 02:27 am
OK, I remember there was a thread on the forum about getting the free IDE to work with C++, it's been a while now. IIRC it was just an option somewhere although I thought you had to point the IDE to your own makefile but maybe not. Either way the GCC compiler was the same.

I actually had a big winge to NXP about the fact that you had to pay for C++ when on other platforms like Arduino it was the default and free. Next thing I know I get asked to beta test the latest (at the time) IDE with C++ support, but by then I had lost interest.

______
Rob
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: bobcousins on Sep 17, 2014, 02:45 am
I've got the Seeduino Arch Pro, so I would quite like to do an Arduino API for LPC1768, I've also got a few mini LPC boards which are ripe for Arduinoising (is that a word?).

Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: graynomad on Sep 17, 2014, 03:09 am
Quote
would it be possible to use the Arduino IDE ( for Arduino DUE ) to compile the code for the LPC810 ?

Not as it is, I think you would have to add your own variant file and core libraries but that's not an area I'm very familiar with.

@Bob/Chris, is it worth trying to develop an LPC Arduino port that will support several versions of LPC? It's certainly been an interest of mine but TBH I'm probably more HW than SW. I can certainly write code (was employed to do so for many years) but it's the toolchain stuff and organisation of files to allow all different CPUs that I struggle with.

______
Rob
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: ChrisMicro on Sep 17, 2014, 08:43 am
>@Bob/Chris, is it worth trying to develop an LPC Arduino port that will support several versions of LPC?

I don't know. But it is always nice if there is a new microcontroller and an arduino lib avalilable. You can be very quick in getting the system running. Of course the arduino lib is not really for professional uses but for a first try it is quite good.

There is an arduino Lib for the STM-microcontrollers:
https://github.com/leaflabs/libmaple

Probably it would be good to have some thing like that for the LPCs.

>but it's the toolchain stuff and organisation of files to allow all different CPUs that I struggle with.

I hate struggling with the toolchain stuff, but it happens every time I use a new controller. 2-3 days of struggling ...
That is the big advantage of the arduino ide: not really comfortable but quick to install.
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: ChrisMicro on Sep 18, 2014, 07:37 am
>I've got the Seeduino Arch Pro, so I would quite like to do an Arduino API for LPC1768
That board looks very promising:
http://www.seeedstudio.com/wiki/Seeeduino_Arch

>I haven't looked at the LPC range for a while, I just noticed the new LPC11U68
Also a nice board:
http://www.nxp.com/demoboard/OM13058.html

Strange that the have the arduino pin out and not an arduino lib.
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: graynomad on Sep 18, 2014, 10:52 am
Quote
Strange that the have the arduino pin out and not an arduino lib.

There's an opportunity for a bright young lad.

I think I'll get one of those OM13058s, that 11U68 CPU looks fantastic and I like the LPC architecture. I've been looking at the SAM D21 of late as well, great features but the registers are a real cluster f*ck. I know it's stupid and only matters to system programmers but that sort of thing really pisses me off.

______
Rob
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: ChrisMicro on Sep 18, 2014, 04:00 pm
>I think I'll get one of those OM13058s,
Yes, thats a really nice board.

For many cost sensitive applications it would be usedful to have just the chip like the LPC810. It costs only around 80 EuroCent.
Here I made an instruction guide on how make an LPC810 programmer with an Arduino Due:
http://www.hobby-roboter.de/forum/viewtopic.php?f=4&t=152&p=602#p602

>I've been looking at the SAM D21 of late as well, great features but the registers are a real cluster f*ck.
Isn't it comming with the Arduino Zero?

http://arduino.cc/en/Main/ArduinoBoardZero

Probably they will provide the low level drivers ...

Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: graynomad on Sep 18, 2014, 05:02 pm
Quote
Probably they will provide the low level drivers

Yes they will, it's in progress as we speak. Like I said it's only an issue for "system" programmers, IE those who work with the bare metal, most Arduino users will neither know nor care.

Quote
For many cost sensitive applications it would be usedful to have just the chip like the LPC810

Yeah, having an ARM in an 8-pin DIP is amazing. Nice job with the Due programmer.

______
Rob
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: bobcousins on Sep 19, 2014, 12:21 am

Quote
would it be possible to use the Arduino IDE ( for Arduino DUE ) to compile the code for the LPC810 ?

Not as it is, I think you would have to add your own variant file and core libraries but that's not an area I'm very familiar with.

@Bob/Chris, is it worth trying to develop an LPC Arduino port that will support several versions of LPC? It's certainly been an interest of mine but TBH I'm probably more HW than SW. I can certainly write code (was employed to do so for many years) but it's the toolchain stuff and organisation of files to allow all different CPUs that I struggle with.


Yes and yes! Struggling with toolchains is right up my creek. :) I have been wanting to get more into extending Arduino IDE so I decided to bite the bullet and have a go. Arduino 1.5.x makes it quite easy, it already has GCC-ARM compiler.

So what I did is take Chris's code and with a few minor changes put it into an Arduino structure. Seems to build OK with the Arduino 1.5.7 IDE but I don't have an 810 to test with. (I've got nearly a dozen LPC dev boards, but nothing with 8xx series, so I have ordered one from ebay.) I haven't looked at uploading, this was more of a test of the concept.

It actually went better than I expected, the Arduino team have made it really easy! Most of the code went into LPC8/cores/lpc810 and the Arduino framework builds it automatically. It should be easy to create new core types and board variants.

I'm not sure where example sketches should go, I compiled the blink sketch for 810 with a small change (include of sketch_ino.h not required), I haven't tried the others.

(https://farm4.staticflickr.com/3897/15095374320_43936fd24d_z.jpg) (https://flic.kr/p/oZVJSu)arduino_lpc810 (https://flic.kr/p/oZVJSu) by donotdespisethesnake (https://www.flickr.com/people/48299294@N03/), on Flickr

There are some linker warnings I don't really understand, and no doubt some other loose ends, e.g. Linux, Mac etc.

The complete add-on package is attached. It should be unzipped into the Arduino sketch folder, so you get a path like "C:\Users\bob\Documents\Arduino\hardware\OpenNxp\..."

I propose to create a github repository to contain the code. Any comments on that idea or anything else please fire away.

ETA: I've now compiled all the sketches and included into package.
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: ChrisMicro on Sep 19, 2014, 01:13 am
Hi bobcousins,

your work is  great :-)

> I propose to create a github repository to contain the code.
I forked a github repo for LPC-arduino here:
https://github.com/ChrisMicro/LPC810_CodeBase
But I don't know in detail how to work with github project teams.

Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: bobcousins on Sep 19, 2014, 01:36 am

your work is  great :-)

> I propose to create a github repository to contain the code.
I forked a github repo for LPC-arduino here:
https://github.com/ChrisMicro/LPC810_CodeBase
But I don't know in detail how to work with github project teams.


Thanks, I really just rearranged it :)

I think it is fairly essential that the git folder structure reflects the target structure, i.e. a user can do a git pull and then copy the tree to Arduino folder. Otherwise it is a nightmare to manage. git doesn't provide an easy way to link files that have the same content, so it's best to copy the ones that are needed to the new place.

Collaboration can be done in github with pull requests which is good for large projects with lots of contributors, but does have more overhead. A lighter method is to specify named collaborators who have full access equivalent to the repo owner., or most often a combination of both.

We could also set up an "Organization" which would perhaps be a cleaner way to do it, I haven't tried that before. Looks pretty easy though. We need to think of a good name for it...
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: graynomad on Sep 19, 2014, 02:12 am
I just ordered two 11U68 Xpresso boards (OM13058), they have Arduino headers so would be suitable for a port. But while there  I noticed that the "LPC800 / LPC812 MAX Board" has Arduino headers as well.

http://www.embeddedartists.com/products/lpcxpresso/lpc812_max.php (http://www.embeddedartists.com/products/lpcxpresso/lpc812_max.php)

And there's the Arch board as well, that's 3 CPUs at least, plus I already have code for the 1227, and it looks like there are other Xpresso boards with Arduino headers, the LPC1549 for example

So far we're talking about maybe 3-5 CPUs, does anybody know if the peripherals are the same? Or does that mean 3-5 separate cores?

As for the Git stuff the "Organisation" sounds ok but as mentioned I have no idea about this stuff.

IF anything is going to happen though some organisation is required and also some deep thought to try and make a platform that can be used with all LPCs, or at least a good cross section of the models.

FWIW here's a link to my Git repo

https://github.com/Graynomad/LARD (https://github.com/Graynomad/LARD)

I know almost nothing about Git except that it's totally unintelligible, it's a miracle I got those files up at all :)

My code has a LOT of stuff for error handling etc. For example every "thing" is an object (well it's C so a structure) with guard bytes at each end and a type byte, all functions that use that object test those bytes.

This is way over the top for the average Arduino project and too heavy for the 800 (about 26k last I looked I think, but that includes a LOT of code for strings etc that is non core). But my goal at the time was to make a framework that was more industrial strength.

Note that there are a lot of debugging calls to toggle pins (pin14high(); for example), ignore them.

______
Rob
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: bobcousins on Sep 19, 2014, 03:00 am

So far we're talking about maybe 3-5 CPUs, does anybody know if the peripherals are the same? Or does that mean 3-5 separate cores?


IME peripherals are only identical within CPU families, e.g. LPC13xx, and may be similar or just quite different between families, so LPC11xx has some completely different peripherals to LPC13xx. e.g. the gpio block is a lot simpler. I haven't looked in detail across the range.

So it might be difficult to create a common library. I still think it is useful to have a single "LPC support package" though. Perhaps the point of commonality is the Arduino API, so at least users can move from one LPC to another with relative ease.

I'd be happy to set up and coordinate github activity. I think I will set up my own repo anyway and anyone can fork it as they wish, and I'd be quite happy to give people access.

Git has a lot of "advanced" features, more than I can fully understand, so I tend to use 2 or 3 basic operations and keep it simple. Github also has some great features which are quite easy to use, like the issue tracker.

I would like to set up a framework for other LPCs, and write some Arduino libs for the ones I have.  Microbuilder have some good code, I think that could be a good starting point.
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: ChrisMicro on Sep 19, 2014, 08:36 am
Hi bobcousins,

I just tried your Arduino rearrangment and copied it in the Arduino Folders.

But when I press "compile", I get the following error:

/home/.../arduino-1.5.7/hardware/OpenNxp/LPC8/cores/lpc810/arduino.c:12:21: fatal error: arduino.h: No such file or directory
#include "arduino.h"


Where do I have to place the missing header files?
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: hiduino on Sep 19, 2014, 09:25 am
The file structure needs a correction to a path.

Change \hardware\OpenNxp\LPC8\

to

\hardware\OpenNxp\avr\



Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: bobcousins on Sep 19, 2014, 10:09 am

But when I press "compile", I get the following error:

/home/.../arduino-1.5.7/hardware/OpenNxp/LPC8/cores/lpc810/arduino.c:12:21: fatal error: arduino.h: No such file or directory
#include "arduino.h"


Where do I have to place the missing header files?


Sorry, that's a problem with case-sensitive file names, in Windows I get lazy. In file "OpenNxp\LPC8\cores\lpc810\arduino.c", it should include "Arduino.h" not "arduino.h". I think that is the only place.
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: ChrisMicro on Sep 19, 2014, 12:12 pm
> should include "Arduino.h" not "arduino.h". I
OK, now it's compiling.
If you want, you can setup the main repository in github. The question is, how can we get my existing library into it.
The next two days I will probably be off, so I will answer later.
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: fungus on Sep 19, 2014, 12:24 pm

Quote
would it be possible to use the Arduino IDE ( for Arduino DUE ) to compile the code for the LPC810 ?

Not as it is, I think you would have to add your own variant file and core libraries but that's not an area I'm very familiar with.


It should be possible. The "Teensy" is ARM based and it manages to integrate itself.

Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: bobcousins on Sep 19, 2014, 05:49 pm

> should include "Arduino.h" not "arduino.h". I
OK, now it's compiling.
If you want, you can setup the main repository in github. The question is, how can we get my existing library into it.
The next two days I will probably be off, so I will answer later.


I have now set up a github repo https://github.com/bobc/OpenLasp.

I'm not sure what you mean about your existing library, I've already incorporated it! I had to make a few changes, e.g. because an Arduino sketch is a C++ program.  So you will probably want to keep your standalone LPC810 repo separate.

I'll get the upload tool working next.
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: ChrisMicro on Sep 22, 2014, 10:56 am
Hi Bob,
wow ... in your GitHub repo I saw that you have been quite busy. You even have started the LPC11 part.
I just forked the repo  and I will play around a little bit.
Do you have meanwhile some LPC810 hardware and could you test some code?

Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: ChrisMicro on Sep 22, 2014, 11:32 am
Greynomad wrote:
>As for the Git stuff the "Organisation" sounds ok but as mentioned I have no idea about this stuff.
>I know almost nothing about Git except that it's totally unintelligible, it's a miracle I got those files up at all smiley

What IDE or editor are you using? I started with a simple editor and a make file. And I tried the GIT command line. This was very complicated.
But later I began to use Eclipse. There is a plugin called EGit. With this it is really easy to use git. You just right click on the file

team -> commit

and than you can store your modifications.
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: graynomad on Sep 22, 2014, 12:26 pm
I use the LPC Xpresso IDE, I gather that's based on Eclipse so maybe EGit will work with it.

______
Rob
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: ChrisMicro on Sep 22, 2014, 04:30 pm
>I use the LPC Xpresso IDE

Hmm... I think that could work.
Using the LPC-Project is very simple. First you have to install EGit.

RightClick on the projects-explorer-window
-> import -> Git -> Projects from Git -> "Clone Button" on the right site
Than you can place

https://github.com/bobc/OpenLasp

in the URI-Field. Than Eclipse should be able to download the repo.

Better is if you fork the project first in Git to your on GitHub account.

There is a simple Tutorial for EGit:
http://eclipsesource.com/blogs/tutorials/egit-tutorial/
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: ChrisMicro on Sep 22, 2014, 05:19 pm
Hi Bob,

I tried to install OpenLasp like you described it:

Installation procedure:

    Copy the Arduino/hardware folder to your sketches folder
    Copy the OpenLaspExamples folder to your sketches folder
    Restart Arduino IDE

But it didn't work as expected.
Instead I had to do the following:

copy
/OpenLasp/Arduino/hardware/OpenLasp/LPC8
to
/arduino-1.5.7/hardware/arduino/LPC8


Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: ChrisMicro on Sep 22, 2014, 05:23 pm
Now the programmer file is missing:
java.io.IOException: Cannot run program "/home/christoph/arduino-1.5.7/hardware/arduino/tools/lpc_upload.sh": java.io.IOException: error=2, Datei oder Verzeichnis nicht gefunden
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: bobcousins on Sep 22, 2014, 08:05 pm
LPC1114 version: I don't have LPC8xx yet but I do have several LPC11xx boards so I though I would have a go at it. I wanted try the "variant" support. It proved a little more tricky, the IDE does not automatically build the required library, it has to be pre-built with makefile and put into source tree. Possibly there is a better way to do it, I might make some inquiries on dev list.

There is a git gui (command "git gui" or "gitk") which runs on Linux and Windows. There are a few things I do on the command line still but generally I use the GUI for most regular operations, commit, push. The GUI is not totally slick as it could be, but generally OK. I would love to have a simpler/better version. Github have a windows client, but I don't use it.


I tried to install OpenLasp like you described it:

Installation procedure:

    Copy the Arduino/hardware folder to your sketches folder
    Copy the OpenLaspExamples folder to your sketches folder
    Restart Arduino IDE

But it didn't work as expected.


In what way did it not work? I just tried it on Linux, and it worked the way I expected. There are some changes needed to the lpc_upload.sh script, I hadn't quite finished that.

To be clear, there is an Arduino "install" folder, and a "user" sketch folder. OpenLasp was designed to be installed into the user folder.

The paths will be different if you install elsewhere, and  it may/may not work. It seems from your later message that it compiles but doesn't find the right tools folder.

I made a couple of assumptions, 1) it is better to install into user folder rather than patching the Arduino install,
2) an installer is not required, as it is a simple folder copy

I could be wrong about both of those things!
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: ChrisMicro on Sep 22, 2014, 10:09 pm
> 2) an installer is not required, as it is a simple folder copy
I like simplicity, so I think it is ok to install the whole thing in the user folder.
But on my system it didn't work so I copied the things into the correct "install" folders. Probably it is a issue of the Arduino IDE version: I have 1.5.7 32bit on Ubuntu.

There is another issue. The bash script for the programmer didn't work:
https://github.com/ChrisMicro/OpenLasp/commit/466c9fbf15e707077878719058f8e0677d2b5a55
and it is necessary to set the "execution bits" of the files.
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: ChrisMicro on Sep 22, 2014, 10:29 pm
Now I tried a second time the installation you described: It worked. So thats OK.
I also saw that you pulled the batch file modification.
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: graynomad on Sep 23, 2014, 07:05 am
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? :)

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
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: hwhardsoft on Sep 23, 2014, 07:25 am
Hey this topic looks very interesting. I've written a Simon Says game (http://www.hwhardsoft.de/english/projects/simon-says/) for the LPC810 under the LPCXpresso IDE and I'm very curious to port my code to the Arduino IDE.
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: ChrisMicro on Sep 23, 2014, 10:09 am
>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
https://github.com/bobc/OpenLasp/blob/master/OpenLaspExamples/lpc810/example05_toneMelody/example05_toneMelody.ino

And the Button functions are working also:
https://github.com/bobc/OpenLasp/blob/master/OpenLaspExamples/lpc810/example03_Button/example03_Button.ino

At the moment I'm experimenting with some none square wave sounds:
https://github.com/ChrisMicro/LPC810_CodeBase/blob/master/src/example50_sinwaveDDS.c

Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: ChrisMicro on Sep 23, 2014, 02:18 pm
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:
https://github.com/ChrisMicro/LPC810_CodeBase
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: mrburnette on Sep 23, 2014, 04:09 pm
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.

https://learn.adafruit.com/getting-started-with-the-lpc810/setting-up-an-arm-toolchain (https://learn.adafruit.com/getting-started-with-the-lpc810/setting-up-an-arm-toolchain)

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 (http://www.hackster.io/rayburne)
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: graynomad on Sep 23, 2014, 04:25 pm
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
Title: Re: PSoC 4200 ARM
Post by: mrburnette on Sep 23, 2014, 05:05 pm

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:
http://www.cypress.com/?id=2218 (http://www.cypress.com/?id=2218)

Personally, I have been using the $4 dollar 4200 Prototype board: http://www.cypress.com/?rID=92146 (http://www.cypress.com/?rID=92146)
and the 4200 Pioneer board: http://www.cypress.com/?rID=77780 (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:
Quote

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

Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: ChrisMicro on Sep 23, 2014, 07:14 pm
>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.
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: bobcousins on Sep 23, 2014, 09:51 pm

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
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: bobcousins on Sep 23, 2014, 09:57 pm

@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:
https://github.com/ChrisMicro/LPC810_CodeBase


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.
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: ChrisMicro on Sep 24, 2014, 05:49 am
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:
https://github.com/ChrisMicro/OpenLasp/commit/f689333ba1f8233ed34dcb44bf84bf705668020b
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: ChrisMicro on Sep 24, 2014, 09:29 am
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:
https://github.com/ChrisMicro/LPC810_CodeBase/blob/master/src/sct.c
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: bobcousins on Sep 24, 2014, 11:17 pm
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?

Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: graynomad on Sep 25, 2014, 12:11 am
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
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: bobcousins on Sep 25, 2014, 01:16 am

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.
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: ChrisMicro on Sep 25, 2014, 09:14 am
>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:
http://hobby-roboter.de/forum/viewtopic.php?f=4&t=152#p602
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.
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: bobcousins on Sep 25, 2014, 10:07 pm

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.

Quote

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:
http://hobby-roboter.de/forum/viewtopic.php?f=4&t=152#p602
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 https://github.com/capiman/lpc21isp

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.
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: graynomad on Sep 28, 2014, 01:12 am
Quote
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 :)

______
Rob
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: Erni on Sep 28, 2014, 01:58 pm
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: <path programs>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
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: ChrisMicro on Sep 30, 2014, 06:15 am
>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.



Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: graynomad on Oct 11, 2014, 01:36 am
Finally got my 1549 Xpresso boards, I'll have a play with the examples then think about doing an Arduino port for that chip.

______
Rob
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: graynomad on Oct 28, 2014, 11:30 pm
For the 800 series guys, looks like there's a new XPresso board out with the 824

http://www.embeddedartists.com/products/lpcxpresso/lpc824_xpr.php (http://www.embeddedartists.com/products/lpcxpresso/lpc824_xpr.php)

Not a DIP8 but a pretty small chip.

______
Rob
Title: Re: LPC810 mini ARM Prozessor in 8 pin dip package
Post by: fjrg76 on Apr 19, 2015, 07:47 am
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.
Which was your source? I couldn't find any that mentions its end of life cycle.