You are currently browsing the archives for the MPLAB 8.00 category.
- 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
Archive for the MPLAB 8.00 Category
Visualizing Data - A taste of Visual C#
15. April 2008 by pilot.
Our brain is wired for image processing and all things visual just reach deep in our mind faster! If there is one moment when I just cannot seem to ever get enough of a “view”, that’s when I am debugging code. The Watch windows, the local variables windows, the stack window are not what I am talking about. The Logic Analyzer window (in MPLAB SIM) and the DCMI (with simulator and emulators) are barely starting to scratch the surface, when I need to debug some complex code, I am willing to use literally everything at my disposal, beyond MPLAB, using hardware (scopes and logic analyzers) but also additional software.
Posted in Tools, Tips and Tricks, MPLAB 8.00 | No Comments »
Visualizing Data - DMCI
10. April 2008 by pilot.
I guess one of the advantages of getting older (if there is any) is that I am becoming somewhat more patient and I am learning to resist the temptation of trying out on the hardware target every single line of new code I write. I am finding myself using the simulator (MPLAB SIM) more and more every day to test thoroughly sections of my code before throwing it out to the ICD. The result is overall less development cycles (code, program (ICD), run, crash, … repeat), more bugs caught early and more productivity.
Posted in Tools, MPLAB 8.00 | 1 Comment »
Look Mom No … Linker Script
9. April 2008 by pilot.
There are so many new features being added to MPLAB at each major (and minor) new release that I struggle to keep up. Just a couple of days ago for example, I was discussing with a colleague how it would be nice to have the MPLAB New Project Wizard to use a default linker script in every new project … so that in most standard cases the repetitive task of adding one (navigating through the many subdirectories inside Program Files) can be spared and … I got stopped mid-sentence and promptly reminded that this feature was already there! In fact since last November, with the introduction of version 8.00, MPLAB has been quietly offering a default linker script when the MPLAB C30 toolsuite is selected.
Thanks !
Posted in Tips and Tricks, MPLAB 8.00 | No Comments »
Watching Expressions
6. February 2008 by pilot.
MPLAB has become such a large application, or I should better say “group” of applications, and it keeps evolving so fast that one can hardly keep up with the pace of monthly (when it is not weekly) updates. Typically before rushing to install a new version I scan quickly through the readme files to see if there is anything new that I could use immediately, otherwise I tend to postpone the update to let it … settle a bit, if you know what I mean.
With MPLAB 8.00 things were different. The PIC32 had just been announced and this was the first new version of MPLAB to openly support it. I was too curious to pass the opportunity and I did the install without paying much attention to what other features had been added. Turns out, I made a mistake because I failed to notice a powerful update to the Watch window capabilities!
Now you can inspect/watch:
- Aspecific element of an array: ar[12]
- An object pointed to by a pointer: *ptr
- An element of a structure/union: str.mbr
- An element of a structure/union via a pointer: p->mbr
- Perform simple math: vrbl-1
- Use constants defined in the program in all of the above: ar[M_SIZE-1]
Just type these simple expressions directly in the watch window in the Symbol Name column
it will work seamlessly allowing you to get a better picture of your… bugs!
Posted in Tips and Tricks, MPLAB 8.00 | No Comments »
Updating Chapter 4
19. January 2008 by pilot.
There are no changes required to the code in chapter 4 after the upgrade to MPLAB C30 v.3.02. But there are some changes in MPLAB 8.00 behavior that will have you puzzled when looking for the subroutines (library modules) used by the compiler for the long long (64-bit) integer multiplications.
In fact, the listing in the Disassembly window will not show anymore the long long multiplication routine muldi3.c as MPLAB 7.40 and older versions did. In a way the Disassembly listing has been cleaned up a bit, but don’t despair. If you follow the next few steps you’ll be able to find the missing routine anyway:
- Take note of the subroutine address, the number after the rcall mnemonic:
(00280 in my case)
- Open the Program Memory Window and make sure to select the Symbolic view
(use the tabs at the bottom left corner of the window) - Press CTRL+F to open the search dialog box and type the address (00280) or simply scroll down the window until you reach the address.
- There you will recognize the label __muldi3 marking the entry point of the 64-bit multiplication routine used by the compiler. (That’s pretty dry reading, isn’t it?)
Looking at the exercises proposed in Chapter 4:
- Using Timer2 to self time the number of cycles used by each arithmetic operation is just a good idea. Exercise 4-1
Most/all operations will fall withing the 16-bit resolution of the timer (within 65,536 cycles) so that it is easy to obtain all the cycle counts in a single watch window shot:
Notice how some of the values changed a little bit since version 1.30 of the MPLAB C30 compiler? - Checking all the divisions at once is just as simple now: Excercise 4-2
Here are the results:
Do you notice anything interesting? Who said float math has to be always slower than integer? - Trigonometric operations (sin()) is performed using polynomial approximations and therefore multiple additions and multiplications. This has to be “hard”… Excercise 4-3
Looking at these numbers you can almost guess the order of the polynomials… - Complex math as well is composed of multiple operations of the fundamental type (integer/float): Excercise 4-4
Posted in MPLAB 8.00, Chapter 4, mplab c30 v3.02 | No Comments »