You are currently browsing the archives for the Chapter 12 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 Chapter 12 Category
3D Graphics
15. May 2008 by pilot.
Using the new double buffered graphic library (see previous post) we can now create simple animations. In chapter 12 we have already seen how to visualize a 2D function using a grid and a bit of perspective (isometric). The next obvious step is to look into 3D objects and how to animate them by moving and rotating them in space. Read the rest of this entry »
Posted in Chapter 12, Tips and Tricks, AV16 | No Comments »
Graphic Animation
10. May 2008 by pilot.
In the good old times, when studying at the University of Trieste, I particularly enjoyed Rational Mechanics, a required class for any EE Master back then, presented by professor Enzo Tonti. One of the things that were always making his lectures a pleasure (and a challenge) was his constant reference to, and practical use of, personal computers to illustrate visually the concept at hand.
Mind those were the early days of the Apple II, the Commodore C64, the Sinclair Spectrum and for the few lucky (and rich) ones among us the first IBM XT personal computers. The graphic capabilities of those personal computers were primitive to say the least. In fact, a single PIC24F128GA010 has today more program memory than any of those personal computers and the resolution of the video output, using the AV16 board we developed in the book (without any hardware assistance), is actually pretty close. Yet prof. Tonti used to teach us how to develop effective demos using little more than a few lines of BASIC or, I should say, of the “soup” of BASIC dialects that were popular at the time… (Actually prof. Tonti developed a brilliant scheme to identify a sort of minimum common denominator among all those disparate systems and Basic dialects that he called Inter-Basic if I recall correctly… there must be a web site somewhere where all this is documented)…
We simulated graphically the motion of planets around a sun, the complex motion of pendulums of various kinds, we animated objects in 2D and 3D! Key to all those graphic exercises was the ability to alternate fast images on the display to obtain the illusion of motion….
Posted in Chapter 12, Tips and Tricks, AV16 | 1 Comment »
Optimizing the graphic library
28. April 2008 by pilot.
While working on the porting to the PIC32 of the code developed for the original PIC24 book it occurred to me that there were some obvious optimizations I had yet to explore.
For a starter, the graphic.c library was using several resources including Timer3, the Output Compare 3 module, the Output Compare 4 module and the SPI1 port in addition to one general purpose I/O (RG0 in this case). The OC3 module was used to generate the Horizontal Synchronization pulse portion of the composite video signal, but the module output pin RD2 (active as soon as the module is enabled) was not used. Rather RG0 was “manually” set during the OC3 interrupt service routine and reset during the Timer3 interrupt service routine. This added unnecessary overhead to the application as the OC3 module could easily be configured to do it all by itself…
Posted in Chapter 12, Tips and Tricks | 1 Comment »