Home  GBA  NGC  NGPC  FPGA  Mobile  GP32  NDS  Oldies  Misc  

Friday 26 August 2011

LPCXpresso

In 2005, I became interested in the NXP's LPC family of ARM-based microcontrollers.
Back in the days, when PIC32 and AVR32 architectures were yet to come, being able to use such a popular 32-bit processor as a replacement to 8-bit ones looked very exciting.
I purchased a simple LPC2106 header board from Olimex and started playing with it.
Withing a few hours, the time to get yourself required stuff such as a serial cable, a MAX232, the ISP programming software, and a GCC cross-compiler, you could get ready to use it.
Debugging was another story, as projects such as OpenOCD were in early stages.
The LPC2106 was based on the ARM7TDMI core, could run as fast as 60MHz, and featured a decent set of peripherals such SPI, UART, I2C, Timers, PWM...
However, it had some drawbacks, especially the GPIO that could not be faster than 5MHz, which was quite disappointing (it has been corrected since, in later revisions of the chip).

Overall, it has been a quite good experience. However I didn't feel as it was yet ready to blow away its counterparts from the microcontrollers market.
It looked more like a microcomputer architecture crammed into a microcontroller, and probably couldn't fight on all fronts against specialized architectures.
However, time has passed since, and I thought it was the right moment to see how the LPC family has expanded...

After some research, I've decided to give a try to one of these LPCXpresso kits, featuring a NXP LPC1343 microcontroller.
You can purchase them at Farnell where they have a section dedicated to NXP products.
At a first glance, there are many thing appealing in this little device :

  • You don't get one board, but TWO boards assembled together.

The first one is a header board containing the LPC1343 itself, with an 12MHz oscillator that can drive the MCU up to its 72MHz limit using the on-chip PLL.
The second one is a full-featured USB programmer and JTAG debugger, labelled LPC-Link.

  • The price is pretty low, especially when you consider that you get a full featured USB programmer/debugger for that price.
  • It is endorsed by NXP.
  • Software support looks good. It is based on a customized version Eclipse CDT.

Eclipse sure has its pros and cons, but considering the state of the art when it comes to programming IDEs for microcontrollers, I'd say it's not a bad thing.

I just received the kit some weeks ago, let's see how thing have improved since my first attempt...

LPCXpresso overview My old LPC2106 header board (top) and the LPCXpresso kit (bottom)

First, let's have a look at the hardware. It looks indeed like two seperated boards in the design, however splitting them would require to carefully cut them using a thin saw.
The target board design is straightforward : it comes in a handy DIL package, making it easy to mount on a breadboard, once you solder headers to it.
It includes a LPC1343 in LQFP-48 package, with all its I/Os exposed to the pin headers, as well as a tiny prototyping area.
Apart from the 12MHz oscillator, there's also a small LED, which can be handy if you want to quick-check that your basic board setup is OK.
The LPC-Link board is based on a LPC3154, and features regulators and bus buffers. It also includes various handy test points for the required core and peripheral voltages.
It also includes a small 10-pin JTAG header, and an USB Mini-B plug for connection to the host PC.
The only thing required to start is the proper USB cable.

Software installation went painlessly on my Windows XP host.
After the installation step, you have to activate the product, which means registering online, and get an activation code sent by e-mail.
Some examples projects can be retreived from the LPCXpresso support website, and imported into your workspace.

Just a side note for those of you that are not familiar with Eclipse : it is quite guaranteed that you'll find it cumbersome.
You'll probably going to hate it at first, as you will have to get accustomed to definitions like "perspectives", "views", "workspaces", etc.
You'll encounter one of the largest combination of drop-down menus, unbearable configuration screens and such.
But after a while, you'll find it not that bad, although the C development environnement is less advanced than its Java counterpart (for what Eclipse was designed first).

The IDE provides rather good code auto-completion, source/header files browsing, context-sensitive help, and many more.
Loading a project and debugging it opens the "Debug perspective".
On the screenshot below, you can see how it looks like.

Debugger Click here to get a full view of the debugger interface

The debugger's user interface is quite neat, and you get usual features you expect, such as code stepping, execution stack, variables and registers monitoring.
One interesting feature, as shown above, is the "Peripheral" view.
You can easily monitor peripheral register values, and value changes (highlited in yellow).
Significant bit groups within a given 32-bit register are dispalyed separately, making it easier to understand what's going on.

Apart from the IDE/compiler/debugger, Code Red has bundled some useful software libraries :

  • The CMSIS library.

CMSIS stands for Cortex Microcontroller Software Interface Standard, and has been initiated by ARM.
It guarantees a common way to access core registers and peripherals, across various compilers and manufacturers, which surely isn't a bad thing.

  • Two standard C libraries : Red Hat's Newlib and Code Red's Redlib.

Redlib is a stripped-down, customizable C standard library, which aims at using the less storage space possible.
Both libraries are available in three different variants. For debugging, the "semihost" one is pretty handy.
It allows you to use file I/O functions, such as "printf". In this case, "printf" will have its output sent to the debugger's console.

Now, let's have a look at the LPC1343 itself. It is based on an ARM Cortex-M3 core.
The Cortex-M3 is a specialized architecture designed for microcontrollers.
Unlike the ARM7TDMI, it features separates busses for instructions and data (Harvard architecture), as well as a system bus.
The ARM instruction set is not supported (!), and you're left with only the Thumb-2 instruction set... That's somewhat heartbreaking to me, as I loved the ARM instruction set's beautiful design.
However, it features a complete set of peripherals, including USB, I2C, GPIO, UART, ADC, Watchdogs.
There's also a very versatile SSP controller, which is (among other things) able to do SPI operations on 4-bit to 16-bit words.
It would have been very helpful at the time with my silly custom handheld console project. The LCD controller used a weird 9-bit words serial interface, so the LPC2106's SPI controller wasn't able to handle it, and I had to use GPIO to make it work.
It would be probably worth giving it another try with this new device...

In conclusion, I've been pretty impressed by the way things have evolved since my first attempt.
The LPCXpresso hardware is great, having a full-featured programmer/debugger as well as an evaluation board at that price is very neat.
Software support is very good. "At last", I'd say.
In my opinion, while the importance of software has been understood by many industries in the computing field, it seemed that microcontrollers-related software offerings were far outdated.
That's probably the main reason why Arduino stuff is so successful... Nothing really new on the hardware side, but an innovative way to deal with software development.
I'm glad to see that the "dark" days are now gone, and I'm pretty excited by what I've seen so far.
I have yet to see what PIC32 and AVR32 are worth (both on hardware and software sides), but NXP has already set the bar very high...

Wednesday 14 July 2010

fpgagen - A SEGA Genesis/Megadrive clone in a FPGA

fpgagen is an attempt to clone the SEGA Genesis/Megadrive console on a Terasic/Altera DE1 board.

So far, both CPUs are done (thanks to the TG68 core from Tobias Gubener and the T80 core from Daniel Wallner), as well as glue logic and a custom Video Display Processor.
It is compatible enough to run many games, with a few glitches, as it is still in a alpha stage.

Here is an early video of some games running :


Source code and programming files have been released at http://code.google.com/p/fpgagen.

Please have a look at the README file for additional information and operating instructions.
All you need is a DE1 board and a VGA monitor.
Enjoy!

EDIT : article about it on hackaday :)

Wednesday 11 November 2009

Alchimie 8

Last week-end, I attended the Alchimie demoparty with my wife. As usual, it was a pretty cool event.
I made a small conference about logic analyzer, introducing the SUMP Logic Analyzer project and performing a small study of the Amiga 500 internals. You can find the slides here.
Some pictures of the event :
Alchimie8
Alchimie8

Sunday 18 October 2009

VieuMikro 2oo9

Last week-end, it was the VieuMikro retrocomputing meeting. IMO, this year's issue was the best I ever attended : we did put some effort into the organization, which was appreciated by people.

I brought my X68000 Expert, a machine that is always appreciated, and spent some time trying to have a rare Tangerine Microtan 65 computer work (an half-success, as we managed to have it display a random set of well-formed characters, so it looks much like a simple RAM issue).

VM2K9
(picture courtesy of Jeremie Marsin)

I also made a presentation of the Guimauve 2ooo project. For those who are interested in getting such a board, a dedicated web page will soon be online, with all the project details, and ordering info.

Thursday 24 September 2009

Infoticaires 2oo9

This year, Infoticaires event was nice, as usual. The main noticeable difference was that it was much more console-oriented than computer-oriented.
There was also a band playing covers of videogame music themes, which was pretty nice.
As I'm not much into gaming (at least, currently), I spent much of my time working on fixing the color scheme of the Guimuave 2ooo adapter.

Infoticaires 2oo9

You can read a detailed report (in French) here.

Tuesday 2 December 2008

Toulouse Game Show 2oo8

Last week-end, I attended the Toulouse Game Show, which is in my guess, the biggest geek convention close to Toulouse. You could find all kind of stuff, including (but not limited to) anime, manga, cosplay, hentai, arcade, rhythm games, import shops, star wars geeks, guest stars. It was very cool indeed. The Silicium association prepared a Famicom-related expo for the event.

TGS2oo8
See my Picasa photo album : Toulouse Game Show 2oo8

Sunday 19 October 2008

Vieumikro 2oo8

October is usually the month when Vieumikro occurs. Fewer people attended the event this year, but it was still very nice.
I brought a "minimal" amount of stuff this year : everything needed to repair our old machines, but nothing related to my projects. Here is a picture of my mess :

vm2k8

I managed to add a SCART RGB output to an old Videopac (Odyssey2) system, I'll write a tutorial about it later.

Here are some links about this event :
http://www.obsolete-tears.com/vieumikro-2008-dossier-120.html
http://sbm.ordinotheque.free.fr/vm2008/

Tuesday 29 July 2008

std::junk<Bi-fi> bbq08 || ~devpsx (and other stuff)

Yet another week-end full of videogames, junk food and drinks, with a bunch of friends (some of them even managed to be virtually here).



Meanwhile, some parcels were waiting for me at home. First, a bare PCB for my yet-to-come Atari 2600 Flashcart :




Then, a Megadrive clone I ordered from Play-Asia. This one features a cartridge connector, in addition to the set of built-in games you usually find in this kind of devices.




As you can see, the device is rather small. The bundled 6-buttons pads are OK, and it also features a PAL/NTSC switch. I still haven't played much with it, but it looks fine.

Tuesday 22 July 2008

Infoticaires 2008

This year's Infoticaires meeting was very nice, as usual. I had no luck with my own stuff (my "generic linker" stopped working after a few hours), but there were so many things to do and people to talk with that it didn't matter anyway ;)

Click here for a video of this event.

Saturday 29 March 2008

Thomas is born

Thomas is born on March 19th. He's a nice little boy of 4Kg210 and 55cm. His older brother, my wife and I are very happy ;)

Tuesday 1 January 2008

Happy new year 2oo8

Happy new year !

2oo7 has been quite a good year for me, and I hope 2oo8 will be as nice. My wife and I are expecting a new kid (another little boy) to born in March, so it will be my main concern for this year at least ;) However, I hope to find some time to work on electronics, mainly FPGA-related stuff.

I have purchased a Terasic DE1 board, also known as Altera Cyclone II starter board. This board features almost anything I need for my projects about emulation of old computers and videogame consoles. This board has already been succesfully used on "larger" designs, such as the Minimig project (Amiga 500 in a FPGA), and there are many systems in the 16-bit era that I would like to have a look at...

Stay tuned ;)

Sunday 11 November 2007

Alchimie 7

My wife and I went to Alchimie 7 party. As usual it was a great party, with lots of geeks and a top-notch organization.

Here is what the event looks like :

Alch7_1

I made a small conference entitled "Emulation with a FPGA", mostly based on my work on the emulation of the Thomson MO5 in a FPGA.

Alch7_2

As I was here for the 3 days that lasted this event, I spent some time working on a project I started some months ago. I didn't manage to do all the stuff I wanted to do on it, but some progress has been made.

Alch7_3

This last picture should be enough for some people to understand what I'm currently working on... Hopefully, I would be able to show more in a few. Stay tuned !

Wednesday 24 October 2007

VieuMikro 2007

This year's VieuMikro meeting, organized by Silicium stood on October 13th and 14th.
Like all people attending this retro-computing meeting, I had a great time.

Here is a small picture of the event :

VM2K7_2
My own stuff :

VM2K7_1
I managed to test the HxC Floppy Drive Emulator on an Amstrad CPC 6128. It works flawlessly, adding therefore Amstrad computers to the large list of supported machines :)

VM2K7_3
See this forum thread for more pictures and comments. Among quite unusual machines (and people :P), stamba demonstrated an impressive set of electronic music stuff, many of them based on the Commodore 64 and various music peripherals.

Next week, I will go to the Alchimie 7 meeting, with hopefully many things to come. Stay tuned!

Monday 13 August 2007

Infoticaires 2007

Last week-end, I've been to the "Infoticaires 2007", a retro-computing convention. It was pretty cool as usual.

Here is an article about this event :
http://www.obsolete-tears.com/infoticaires-2007-dossier-106.html

It has been an opportunity for me to show the usbSID interface, and try to make the HxC Floppy Drive Emulator work on Amstrad CPC family of computers.
This last attempt failed, as I did not have the correct vhdl core version (and without Internet access during this week-end, I wasn't able to contact Jeff about it). Anyway, a new attempt is scheduled for VieuMikro 2007 (or sooner if I can).

About my own stuff, I've been playing these last weeks with AVR microcontrollers, and managed to write some code for SD cards reading, FAT file system handling and such... Things that would be handy for many projects I have in mind, but that's another story :)

Sunday 3 December 2006

Vieumikro 2006

EDIT : you can find a detailed article, as well as links to many other articles, photos and videos, on this page at MO5.com

As I'm writing this, Vieumikro 2006 just happened this week-end.
Vieumikro is a meeting about old computers and game consoles. We all had a great time here.

VM2006
It was an opportunity for me to show some stuff :

I haven't many photos of the event myself, but I know that some people made a bunch of photos, and will show them on the web soon, so I'll link to their reviews once they're done.
Meanwhile, you will find below a small video of my own installation at this meeting, where you can see Defender of the Crown, my IntvFPGA gizmo, then see (and hear) the SID 6851 in action, through the parallel port interface :)