We think it’s pretty impressive to see a Stellaris Launchpad playing back Video and Audio at the same time with a respectable frame rate. It must be a popular time of year for these projects because we just saw another video playback hack yesterday. But for this project [Vinod] had a lot less horsepower to work with.
He’s using a 320×240 display which we ourselves have tried out with this board. It’s plenty fast enough to push image data in parallel, but if you’re looking for full motion video and audio we would have told you tough luck. [Vinod’s] math shows that it is possible with a bit of file hacking. First off, since the source file is widescreen he gets away with only writing to a 320×140 set of pixels at 25 fps. The audio is pushed at 22,400 bytes per second. This leaves him very few cycles to actually do anything between frames. So he encoded the clip as a raw file, interlacing the video and audio information so that the file can be read as a single stream. From the demo after the break it looks and sounds fantastic!
Continue reading “Video Player Built From Stellaris Launchpad”
Most microcontroller manufacturers give you some kind of free development toolchain or IDE with their silicon products. Often it’s crippled, closed source, and a large download. This is pretty inconvenient when you want to have firmware that’s easy to build and distribute. I’ve found many of these toolchains to be annoying to use, and requiring closed source software to build open source firmware seems less than desirable.
It’s possible to build code for most microcontrollers using command line tools. You’ll need a compiler, the device manufacturer’s libraries and header files, and some method of flashing the device. A lot of these tools are open source, which lets you have an open source toolchain that builds your project.
Setting up these tools can be a bit tricky, so I’m building a set of templates to make it easier. Each template has instructions on setting up the toolchain, a Makefile to build the firmware, and sample code to get up and running quickly. It’s all public domain, so you can use it for whatever you’d like.
Currently there’s support for AVR, MSP430, Stellaris ARM, and STM32L1. More devices are in the works, and suggestions are welcome. Hopefully this helps people get started building firmware that’s easy to build and distribute with projects.
Here’s an LED and Button shield for the Stellaris Launchpad (translated) which you can fabricate at home. It gives you access to a 5×5 matrix of LEDs, and adds four more buttons. In order to cut down on the number of I/O pins required to operate the lights [Cosimo] is using the concept of Charlieplexing. This lets him get away with just six driver pins and four button pins.
It’s not just the finished product that interests us here. The fabrication itself is worth clicking through to his project post. What initially caught our eye is the use of Kapton tape as an insulator so that clipped off LEDs could be used as jumpers flat against the top side of the board before populating the LEDs themselves. After those are soldered in place he masks them off, as well as the button footprints, and uses spray paint to protect the top side of the board. The final look is more polished than most at-home project boards.
If you have a Stellaris Launchpad sitting around, have a go at using it as a logic analyzer
The Stellaris logic analyzer is based upon this earlier build that took code from a SUMP comparable Arduino logic analyzer and ported it to the much faster and more capable Stellaris Launchpad with an ARM Cortex 4F processor.
This build turns the Launchpad into a 10 MHz, 8-channel logic analyzer with a 16 kB buffer comparable with just about every piece of software thanks to the SUMP protocol. Even though the ARM chip in the Launchpad isn’t 5 Volt tolerant, only pins 0 and 1 on Port B are limited to 3.6 Volts. All the other pins on Port B are 5 Volt tolerant.
Not a bad piece of work to turn a Launchpad that has been sitting on your workbench into a useful tool.
[Ronen K.] wrote in to tell us about the MOD playing Stellaris Launchpad project he recently completed. A MOD is a sound file for the computers of days long gone. But you’ll certainly recognize the sound of the 8-bit goodness that is coming out of this device.
To understand how a MOD file stores samples you might want to glance at the Wikipedia page. There are a ton of these files out there, but this implementation is meant for files with only four channels. For now the only external hardware used is an audio jack which needs a ground connection and a PWM signal on each of the two audio channels. [Ronen] is storing the files in flash memory rather than using an SD card or other external storage. This leaves 213k of space for up to six files that can be selected by the user buttons which cycle forward or backward through the list. See this demonstrated after the break.
The project ports existing code from an STM32 application. Since that is also an ARM microcontroller there’s not a ton of work that needed to be done. But he did have to write all of the PWM functionality for this chip. This PWM tutorial turned out to be very helpful during that process.
Continue reading “MOD Player For The Stellaris Launchpad”
[Joonas] has been following TI’s ‘getting started’ tutorials for their new Stellaris Launchpad. Everything had been going swimmingly until [Joonas] reached the fourth tutorial on interrupts. To the ire of LEDs the world over, implementing PWM on the new Stellaris Launchpad is a somewhat difficult task. After banging his head against the documentation for hours, [Joonas] finally cracked his PWM problem and decided to share his discoveries with the world.
The Stellaris has a PWM mode for its six hardware timers, but unfortunately there are no PWM units on the chip. Solving this problem required making two 16-bit timers out of a single 32-bit one. This allowed [Joonas] to specify a ‘load’ and ‘match’ value.
After coding this up, [Joonas] discovered the PWM timer only works on two of the Launchpad’s pins. Hours of Googling later, he had real PWM on his Stellaris Launchpad.
Given the amount of time [Joonas] spent on this problem, we’re glad to help all the other frustrated Stellaris tinkerers out there by sharing this.