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

Tuesday 12 April 2011

PC Engine in a FPGA - update

A small update, providing great results... :)



Games I've tested so far run fine, and the rendering issues I encountered were due to a bad handling of the BYR register update... Sounds silly, but it changed everything :D

Sunday 10 April 2011

PC Engine/Turbografx-16 in a FPGA

Here is a preview of my current project : a PC Engine hardware clone in a FPGA.



It is in a very alpha stage, but well, some games work. There are many bugs remaining but the first results obtained are quite encouraging.

For people that can read French, see my "project log" here : http://heliscar.com/greg/blogpce.txt

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

Monday 19 October 2009

Guimauve 2ooo - Official website

Everything you need to know about the Guimauve 2ooo Apple //c VGA adapter can be found here : http://silicium.org/g2k/.
Last details have been sorted out, and boards are now available for purchase.
Enjoy!

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.

Wednesday 30 September 2009

Guimauve 2ooo - First batch ready!

After many tedious hours of soldering, here are the 8 first Guimauve 2ooo Apple //c VGA adapters :

G2K First Batch

More to come soon, after the official announcement that will occur during VieuMikro event.

Friday 25 September 2009

X68000 Power Supply Repair

Some time ago, I managed to get a (broken) X68000. The power supply died the first time I powered it on, but it wasn't much of an issue, as you can easily replace a broken power supply with a standard ATX one, as explained here.

The main issue with this X68000 was an overclocking mod that had been performed by its previous owner, and prevented the machine to boot. I managed to remove this mod (the tricky part was to eventually find a track on the motherboard, which had been cut), and everything went fine. However, having an ugly grey box (the only spare ATX power supply I had at that time) was really awful, especially as I love the case design of this machine.
So I purchased another ATX power supply, and managed to fit it into the case, reusing the original fan for proper cooling of the whole thing.
Here is a picture of the X68000 and its brand new power supply ;)

X68000PS

Thursday 24 September 2009

TMS7041 Internal ROM Dump

Exelvision is an obscure brand of computers from France, that operated in the 80s, their most famous home computer being the Exl 100.
For more information, here is Fabrice Montupet's Exelvision-related website, which is the largest source of information you can find on this company and their computers.

The Exl 100 embeds two CPUs : a TMS7020, and a TMS7041, the TMS7020 being the main CPU, whereas the 7041 is used as a microcontroller, and is responsible for most I/O related stuff, including screen display (for instance, it stores in its internal ROM the character table).
Until now, the contents of this ROM hadn't be retreived, so it was an issue for emulator writers. However, someone on Silicium's forum found this newsgroup thread, explaining a way to retreive the internal ROM contents of a PIC7040, which is very close to the TMS7041, so I decided to give it a try.
For this purpose, I used my favorite FPGA board, to make the TMS7041 output its internal ROM to the board's SRAM, then dump the SRAM contents over a serial port. Here is a picture of the whole stuff :

TMS7041

After some attempts, it seems that it worked fine :) Emulator writers are currently analyzing the ROM contents, and have a good feeling about it.
It should hopefully lead to a better understanding and emulation of these obscure machines.

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.

Saturday 18 April 2009

Guimauve 2ooo - Ready for production ;)

I fixed the mistakes I made on the previous prototype, and I managed to add a small feature : it is now possible with the help of a jumper to choose between color mode, or green-and-black monochrome mode, for those who (like me) had a monochrome display, and prefer to use this mode which provides a crisper picture.

Here is a picture of the final PCB, assembled.

G2Kn1

I still need to tweak the CPLD code a bit, but it should be now only a matter of weeks until first boards are available for those who might be interested. I'll tell more about it later.

Saturday 28 March 2009

Guimauve 2ooo - Apple //c VGA adapter - Prototype WORKING!

The Chat-Mauve-clone-but-with-VGA-output needed a name, and here it is : "Guimauve 2ooo".
Here are some pictures of the first prototype, which works fine !

Prototype

Prototype

You may wonder what happened to what should have been a nice board ? ;) Well, I made two stupid mistakes so I add to cope with them :

  • The part I selected in Eagle as the DB-15 connector on the Apple side had its pin numbering "reversed".
  • I totally "forgot" that one of the components expected a 5V power supply, while all the others use 3.3V, so I added it.

I will have to redesign the board but well, it won't be much of a big deal.

Saturday 28 February 2009

"Chat Mauve" clone - board designed

I just finished designing the board, using parts I already own for the most :



It has been designed to be the more "homebrew-compliant" possible : it is single-sided, and there will be only a single wire to add. Next step, order parts, and build the PCB (or have it manufactured), then hope the whole thing will work ;)

Friday 20 February 2009

"Chat Mauve" clone - VGA and colors fixed.

Here is a new picture, with VGA colors fixed. I still use a 2-bits R-2R ladder for output, so the colors are still a bit different from what's produced by the original adapter, but I can't say that the result is better or worse, so I'll probably keep it this way.
On the left, the original adapter's output on a LCD TV, on the right, VGA output of my adapter.

CM_VGA2

The image isn't very crisp (I get a better image using Starter Board's own VGA output, even if it only features 1 bit per component). It means that it's now the time to make a proper board, instead of having such a mess of wires hanging around ;)
The desing still uses less than 60 macrocells, so it could fit into a XC9572XL for instance, which is probably what I'm gonna use at the end.


Parse error: syntax error, unexpected $end in /homepages/29/d385809540/htdocs/torlus/ecrire/tools/bbclone/var/last.php on line 742