Go Down

Topic: LPC810 mini ARM Prozessor in 8 pin dip package (Read 16577 times) previous topic - next topic

ChrisMicro

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

ChrisMicro

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);

graynomad

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
Rob Gray aka the GRAYnomad www.robgray.com

ChrisMicro

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.




graynomad

#4
Sep 16, 2014, 03:45 pm Last Edit: Sep 16, 2014, 04:44 pm by Graynomad Reason: 1
I have a couple of pages describing the API here

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
Rob Gray aka the GRAYnomad www.robgray.com

bobcousins


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!
Please ask questions in the forum so everyone can benefit. PM me for paid work.

ChrisMicro

>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 ?

graynomad

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
Rob Gray aka the GRAYnomad www.robgray.com

bobcousins

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.



Please ask questions in the forum so everyone can benefit. PM me for paid work.

graynomad

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
Rob Gray aka the GRAYnomad www.robgray.com

bobcousins

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?).

Please ask questions in the forum so everyone can benefit. PM me for paid work.

graynomad

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
Rob Gray aka the GRAYnomad www.robgray.com

ChrisMicro

>@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.

ChrisMicro

>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.

graynomad

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
Rob Gray aka the GRAYnomad www.robgray.com

Go Up