- AV16 (4)
- builtin (1)
- Chapter 1 (2)
- Chapter 12 (3)
- Chapter 14 (1)
- chapter 2 (1)
- Chapter 3 (1)
- Chapter 4 (1)
- Chapter 5 (4)
- Configuration (1)
- Events (2)
- Flying (4)
- I2C (5)
- Linux (1)
- MPLAB 8.00 (5)
- mplab c30 v3.02 (11)
- PIC24 (2)
- PIC32 (9)
- Tips and Tricks (14)
- Tools (10)
- Warnings (2)
- 19. November 2008: Bending the laws of physics
- 13. November 2008: Electronica 2008
- 6. November 2008: Deep Blue PIC32
- 4. November 2008: MIPS DSP Libraries
- 1. November 2008: Inexplicably Working Errata
- 26. October 2008: PIC32, Harvard or Von Neumann
- 22. October 2008: Back online, Excuses and the Blues Brothers
- 28. July 2008: Not a dsPIC!
- 23. July 2008: Scilab, FLEX and the Evidence
- 22. July 2008: New compiler and new libraries for the PIC32
Blogroll
PIC24
PIC32
Bending the laws of physics
19. November 2008 by pilot.
As a reader pointed out today, when preparing one of the pictures in Chapter 3, I did use a little trick, I had almost forgotten…
I did reduce the DELAY constants by a factor of 100 to … speed things up … so to speak. Otherwise the Logic Analyzer window would not be able to contain all the samples required to produce the complete “Hello” message.
I do these things quite a bit when I use the Simulator … Read the rest of this entry »
Posted in Tips and Tricks | No Comments »
Electronica 2008
13. November 2008 by pilot.
This is the week of the Electronica 2008 in Munich (Germany) and I am available at the Microchip booth (A4-560) all week to talk about 16 and 32-bit programming but especially about flying!
If you are a PIC24 or a PIC32 pilot, don’t forget to pass by and say hello!
No secret handshakes required, just ask of Lucio…
Posted in Events | No Comments »
Deep Blue PIC32
6. November 2008 by pilot.
An email from Tim O. this week made me think about the possibility of computers conversing with humans, or rather the impossibility of it, as Turing once proposed it as the ultimate test of the machine intelligence. This in turn made me think about another story that made the news a few years ago (1997) when IBMs Deep Blue computer won a historical match against the (back then) world chess champion Garry Kasparov.
Posted in PIC32 | No Comments »
MIPS DSP Libraries
4. November 2008 by pilot.
With the latest release of MPLAB C32 compiler v.1.04, Microchip has added a complete set of DSP functions for the PIC32 to complement the standard math libraries. Among them you will find a number of vector processing functions and as expected several different types of FFT functions. You will remember that in Chapter 7, in order to give the PIC32 some work to do while we were playing wit the cache and pre-fetch mechanism to find the optimal performance tuning, we used a FFT function. That was a simple “schoolbook” implementation of the basic algorithm in C.
If you try the new DSP library, don’t be too surprised if you discover that the speed of execution is increased by orders of magnitude. In fact the libraries are written for fractional numbers (16 and 32-bit fixed point numbers) as most DSP algorithms do, and were hand optimized (large portions were written in assembly) by MIPS experts to obtain the maximum performance from the PIC32 instruction set.
Posted in PIC32, Tools | No Comments »
Inexplicably Working Errata
1. November 2008 by pilot.
A few days ago, I received an email from a reader who reported a new errata on page 123 (in the “Learning to fly the PIC24″ book) in the write() function, an example of redirecting the “stdout” output stream.
The function receives a pointer to a buffer containing characters that need to be forwarded to the output device of choice and a counter. A loop is performed to print sequentially the required number of characters, but (here is the bug) I apparently omitted to increment the buffer pointer. To the reader’s greatest surprise the code example seems to work anyway! How is this possible?
Posted in mplab c30 v3.02, PIC24 | No Comments »
PIC32, Harvard or Von Neumann
26. October 2008 by pilot.
In Chapter 6 of the PIC32 book I briefly mention that the PIC32 differs from all previous PIC microcontrollers since it offers a Von Neumann programming model as opposed to the Harvard model adopted by all previous Microchip architectures. Then, in a note I remind all the readers that the core of the PIC32 (MIPS M4K) is Harvard based. More than one reader has written back to me to report the apparent contradiction, while in fact there is none. Let’s see if I can make things clearer …
Posted in PIC32 | No Comments »
Back online, Excuses and the Blues Brothers
22. October 2008 by pilot.
It has been almost three full months since my last posting and you might have been wondering what happened … I have only a few excuses, but good ones:
- I moved back to the old continent, I am now writing this from Munich, Germany
- I changed job (a bit), while still working for Microchip, I am now responsible for the marketing of 32-bit microcontrollers in Europe, Middle East and Africa. This of course requires quite a bit of traveling.
- But perhaps the most important one is my new “project”, my son Luca, who is now 10 months old and absorbing ALL that is left of my wake time.
In this last few months I have received tons of email, (I love emails from my readers) and tried to respond to most of them. Some of you have been reporting about typos in the books and/or issues with new versions of the compilers and libraries. Others have brought up interesting ideas and questions that I plan on using in the future postings. Slowly, I will try to cover all the backlog and get back live.
Stay tuned!
P.S.: For those among you who are old enough to remember the Blues Brothers movie, here is Jake’s (Jim Belushi) original list of excuses:
- I ran outta gas.
- I had a flat tire.
- I didn’t have enough money for cab fare.
- My tux didn’t come back from the cleaners.
- An old friend came in from outta town.
- Someone stole my car.
- There was an earthquake,
- … a terrible flood,
- …locust’s.
- It wasn’t my fault!!
Posted in PIC24 | No Comments »
Not a dsPIC!
28. July 2008 by pilot.
The last two days of the Masters ‘08 have been such a rush that I could not possibly find the time to write any more postings during the day, and I was too exhausted, once back home, to write the night. For two days I was on duty in the “ask the experts” area behind the PIC32 table playing with a few demos derived from the last few chapters of the book(s). I met with so many PIC users/enthusiasts that I cannot possibly write about all of them and their projects/ideas. Perhaps the funniest things that happened though is when one of them, (a veteran of several Masters) after checking out a few colorful PIC32 graphic demos, lying on the table in front of me, had a sudden epiphany, looked up and with eyes of stupor and a wide smile exclaimed: “But… it is not a dsPIC!”
It had never dawned on me that someone could have had this (wrong) impression. It is true, the official marketing campaign of the PIC32 talks a lot about pin-out and software compatibility with Microchip 16-bit architecture (although when you look closely it is the PIC24F and in particular the GA0 series that all the documentation keeps referring to). Not to mention that the part number being “surrounded” by the dsPIC30 and the (ill named) dsPIC33 can further confuse the matter.
Once I reassured him that the PIC32 was a very simple, general purpose, 32-bit microcontroller that just happened to run C code very fast, I saw him sigh with relief. He grabbed a copy of the brochure and disappeared rapidly in the crowd heading toward the development tools counter.
Did you happen to think the same? Let me know, because we certainly never meant it to be!
Posted in PIC32 | No Comments »
Scilab, FLEX and the Evidence
23. July 2008 by pilot.
Third day of the Masters’08 and I discovered another little treasure.
If you have been dreaming about using a tool like MATLAB to model your applications and to generate automatically your control algorithms, but you did not have the kind of money required to purchase the tool, here is an interesting Open Source alternative called Scilab:
But wait there is more, much more. The guys from Evidence s.r.l. have actually combined the Scilab tool with a vast library of modules for the dsPIC and PIC24 so that you can generate an entire advanced control application simply by dragging and dropping graphic icons on your PC screen, it’s called SciCOS. To complete the picture they have created a line of modular components (that somewhat reminded me of the PC104 standard) called FLEX. Useless to say that all FLEX boards/components have a corresponding model in Scilab and integrate perfectly in your control solution.
I have seen some pretty impressive real time demos, check them out!
Posted in Tools | No Comments »
New compiler and new libraries for the PIC32
22. July 2008 by pilot.
The MPLAB C32 compiler got today its first new release v1.03!
And it is not just any minor update of the tool as the small version number change would have you believe… there are two important changes:
1- The math libraries have been significantly optimized, in particular the floating point math

2- The Student Edition of the compiler (free download) is now using a scheme similar to the MPLAB C30 compiler. The first 60 days there are NO limitations of any sort. After this period, only the maximum optimizations level is limited to level 1 (still very effective).
Gone is the limitation in size that had so many of us frustrated when trying to compile the more advanced libraries (like the USB Host Stack for example)!
Check the MPLAB C32 compiler web page for more info.
Posted in PIC32, Tools | No Comments »