Blue Toys

August 7, 2010 · Posted in Electronics 

I got a new toy in yesterday: the NGX Technologies BlueBoard LPC1768-H. As the name suggests it is a blue board with a LPC1768.

What is a LPC1768? Well, it’s a microprocessor. More specifically, an ARM Cortex-M3 capable of running at speeds up to 100 MHz with 512 kb of Flash memory, 32 kb RAM, and a huge load of peripherals: eight DMA channels, Ethernet MAC, USB 2.0 (Device/Host/OTG), four UARTs, 2 CAN channels, SPI, I2C, I2S, 12-bit A/D converter, 10-bit D/A converter, 4 timers, and a real-time clock – amongst others. Disregarding peripherals, it comes with up to 70 GPIO’s (the chip itself is a 100-pin package, part of which is dedicated to things like power, crystal, and the JTAG interface).

It puts any PIC, AVR, or similar small micro to shame.

The reason I went with this particular board is that it doesn’t come with crap. Most development boards out there come with tons of circuits and peripherals (buttons, LEDs, LCD displays and whatnot) and don’t leave a whole lot of room to do what you actually want to do with the board. This one contains just the chip, all the basic supporting circuitry, a few things like a USB connector and an onboard LED for testing/status-displaying purposes, and all other pins are broken out on standard .1″ headers. Yay for that!

The board comes from NGX Technologies. I ordered from them directly – SparkFun also sells the board, but the SparkFun price was about as the total cost of the board and shipping directly from NGX, so that’s an easy choice. They were pretty quick with shipping – I had the package delivered via the EMS service. At first they e-mailed me warning about previous bad experiences with a package getting held up in customs, but that’s not the fault of the shipping service. Since the alternative was a lot more expensive I had them ship EMS anyway and it went fine, the package was here in about a week.

I’m using the Olimex ARM-USB-OCD programmer (starts at about $50, and is really the way to go over the parallel port Wiggler-type interfaces, which tend to be glitchy and slow), combined with Rowley CrossWorks for ARM ($200 for a home use license). Currently also connected to the board are my Saleae Logic (inexpensive, very user-friendly 8-channel USB logic analyzer – very happy with this one!) and some breadboard with RS232 line level converters, hooking up the chips UART0 and 1 to my PC.

I’ve never dealt with these chips before, and there are a few things to be aware of:

  • In CrossWorks, you need to create a project (with the LPC1768 as target chip) and have that project open before the JTAG interface will connect to it. If you try to connect without an open project, it will say ‘target not responding’. This had me stuck for about half an hour at first.
  • The startup file (LPC1700_startup.s) that comes with the CrossWorks LPC1000 support package by default does does not jump to code execution after a reset. There is a good reason for this (explained in the comments in the file). Your code will only run if you use the ‘Build and Run’ option (from the ‘Build’ menu), or when the STARTUP_FROM_RESET preprocessor directive is defined (at which point the startup code will jump to main() as normal).
  • As with most electronics things, the first task is to get a blinking LED. The BlueBoard has a LED at pin 1.29. The initial delay routine I wrote consistently blinked the LED at 333 KHz no matter how long or short I made the delay loop. It turned out that the compiler optimization had a hand in this. After disabling optimization (build configuration under ‘Code Generation Options’), doing nothing for 4 million clock cycles produced a neat 1 second delay. (4 MHz is the default speed from the on-chip oscillator, at which the chip will always run after a reset; I’m not spinning it up to the full 100 MHz just to blink a LED :P ).
  • If you buy the Olimex ARM-USB-OCD, it comes with a DC jack outlet and a short cable the purpose of which is to power Olimex-built development boards, but it also works perfectly fine with the BlueBoard, removing the need for a dedicated lab power supply (though I’d prefer to use that anyway, since it can provide much more power than the USB port can and removes the risk of blowing up said USB port in case of a short).

Overall, even though the BlueBoard lacks an on-board RS232 level converter (which is useful, since RS232 is the best invention since sliced bread, or at least, it is when you’re dealing with embedded software) and there is no documentation to speak of (aside from the board schematic, which does contain all the info you need though), there aint much that can beat it, especially at the price. I would definately recommend it to anyone looking for an ARM to play with.

Comments

Leave a Reply