M-Stack (link) is a new, well-documented, free and open source implementation of a USB stack for Microchip PIC platforms developed by Signal 11. That is Alan Ott’s creation, a name that many of you will immediately associate to the excellent cross platform HIDAPI libraries.
The software is dual-licensed under the LGPL version 3 and the Apache License version 2.0. It may be used without royalty payment in both commercial and open hardware projects so long as the conditions of either the LGPL or the Apache License can be met.
(Commercial licenses are available for purchase for companies and projects which cannot or wish to not comply with the terms of either the LGPL or the Apache License.)
A short while ago I wrote about a small module that I wrote to support the Audio Codec chip present on the Mikromedia (PIC24) boards (link). What I had not noticed though was that I had been playing at home with a beta version of the board (provided very early on by the Mikroe team) while the production release rev 1.1 had departed just a little bit from the original design and used only one different component. Do you want to try and guess which one? Of course, the audio codec!
The new Mikromedia boards use the much improved, omni-capable, universal… VS1053 from VLSI technology. You can now play not only MP3 files, but also WMA, WAV and even Ogg Vorbis files, no sweat!
The device data sheet, states that the communication interface is absolutely backward compatible so when I discovered the change I felt absolutely confident it was going to be a minor update if any was required at all! Yeah right…
To spare you the excruciating 6 hours of debugging that followed, here are the key lessons (re-)learned:
The web page is titled “Microprocessor History” and tells the story of what was research and development work done by a little know company, called PICOElectronics Ltd, in Scotland in the late 1960′s.
Now, while I am not particularly interested in the debate wether they managed to beat INTEL to the punch, I found some of the details extremely curious for how this work seems to be eventually traveling across the world to NY first where General Instruments had its headquarters (PICO Electronics used GI to manufacture their chips) and later to a new (in those days) factory in Arizona! Among the many products developed in those years were the very first video games (Pong) components.
What a coincidence, that factory eventually was sold by GI to a group of private investors funded by venture capital (Sequoia) who created: Microchip Technology Inc.
Their first microcontroller product was then called the PIC!
I have received a couple of requests recently for support interfacing a PIC32 or a PIC24 to some popular MP3 decoders/codecs from VLSI technology. Since I had a PIC24 MicroMedia board on my desk that begged to be used, I took the opportunity to give it a test ride and put the VS1011E chip to its pace.
I started using MPLAB X since the very first betas were made available so I have eventually acquired a little confidence with the tool. Occasionally though I can still find myself hunting around for a feature/configuration parameter that is not where it used to be (in MPLAB 8). Eventually it just takes a little random probing around in the configuration dialog boxes and the many sub-panes… it’s all there!
A couple of readers have warned me recently that SDHC and SDXC cards are becoming the norm and that spells troubles for the unaware.
In fact, both in the PIC24 (both editions) and the PIC32 book, I spent a couple of chapters to discuss the interface to SD/MMC Cards and developing a small library to allow access to files when the cards are formatted using a FAT16 file system.
While the key principles remain the same, things change quite a bit when you start consider (7 years later) what the market offers. Basically, SD/MMC cards are slowly disappearing as the memory size upper limit (2GB) of the original standard has been reached and quickly passed. To overcome that limitation, since 2009, several vendors have started adopting the SDHC specifications first (increasing that limit to 32GB) and the SDXC specification later (increasing the limit to 2TB).
At the same time the file system has changed as most users nowadays prefer FAT32 formatting and eventually the SDXC cards have been standardizing on the “exFAT” (patented) file system.
The SDMMC.c and FileIO.c examples do NOT support any such features!
Clearly it goes beyond the scope of the books I wrote, and it would require a much more complex body of code to keep up with these advances. Although I might soon add support for the FAT32 file system (or I might simply replace it in the examples), I think the most appropriate thing to do is to direct my readers to the Microchip MDD File System library. This is a standard component of the larger Microchip Application Library and is a free, current, professionally maintained and documented piece of software that I greatly recommend for all actual embedded control applications!
I am not ashamed to admit that I love and use a lot Wikipedia. It is fast, convenient and gets most of the technical stuff I typically look up right to the level I can understand and use it. But perhaps most importantly, it is one of the few places on the internet without advertising!
This is something I truly appreciate and I am willing to pay, so every year I do give a small contribution (just USD 10) to keep it like that!
Jimmy Wales wrote:
<<< Google might have close to a million servers. Yahoo has something like 13,000 staff. We have 679 servers and 95 staff.
Wikipedia is the #5 site on the web and serves 470 million different people every month with billions of page views.
Commerce is fine. Advertising is not evil. But it doesn’t belong here. Not in Wikipedia. Wikipedia is something special. It is like a library or a public park. It is like a temple for the mind. It is a place we can all go to think, to learn, to share our knowledge with others. >>>
they introduced a PIC32MX7 version (adding Ethernet connectivity)
and shortly after that a “microMMB” version with the MX4 processor:
so small that it barely gives you room for four screws around the display to fix it to a panel.
These boards are great to experiment with the Microchip Application Library (MAL) and in particular with all things graphics, touch, audio and USB. But they are also ready for being mounted in your embedded control application and to became it’s user interface if not the brain.
I wrote a lot of code for them and I intend to share it and document it gradually in the coming weeks to show you how to get the basic functionality (user interfaces) but also to show you things that many believe would only be possible with much more expensive and complex systems.
You can get a glimpse of it on the new page of the Exploring PIC32 web site dedicated to the Multimedia boards and the Multimedia demo projects. I am so fond of them, that I have decided to help MikroElektronika re-sell them and to provide documentation and support on this blog and on my two companion web sites.
It is Christmas, again, not sure how this happened …
Of all my ambitious plans for 2009 only a few got done, but looking back I am pretty sure somebody must have stolen a couple of months from this years’ calendar. I will be more careful next year, won’t let it happen again.
I have been reading more about RTOSes recently, and specifically FreeRTOS:
My new year resolution: Learn to use (Free)RTOS to give better structure to my projects and practice the art of programming as the real pros!