AV16/32 Expansion Boards are availble again!

FAQs

1- When I try to execute the example code from chapter 1 thru 3 on the Explorer16 board I notice that not all the LEDs are working properly. Do I have a defective demonstration board?
Most probably there is nothing wrong with your board. In MPLAB check the configuration bits settings and make sure that they match those recommended in the Pilot Checklist "Device Configuration for the Explorer16 demonstration board". In particular look out for the JTAG port option to be "Disabled" (this should be MPLAB default setting anyway). When enabled, the JTAG port takes control of 4 pins of PORTA (RA5, RA4, RA1, RA0) effectively depriving you of half the string of LEDs.

2- I just finished reading chapter 13 and I am comparing the listing present in the book with the corresponding code in the included CDROM. It appears that the function readSECTOR() has changed. Which version should I use?
Don't worry, both versions are fully functional and correct. As soon as you will reach chapter 15 the differences will be explained. The rule wants that only in the last chapter the identity of the killer is revealed!

ERRATA

Should you notice a conflict between my narration and the official Microchip documentation, ALWAYS refer to the latter. However please send me an email if a conflict arises. I will publish any correction and useful hint I will receive on this web site, your help is appreciated!

Page 123: In the function write(), replace the line:

           putU2( *(char*)buffer);

with

           putU2( *(char*)buffer++);


The following Errata have already been corrected in the second print
(March 2007):

Page 62: replace
bits 3, 4 and 5 of the status register (SR)

with:
bits 5, 6 and 7 of the status register (SR)

Page 100 and  page 101: inside function iReadNVM() and iWriteNVM() the while loop waiting for any work in progress to be completed is checking the content of the memory SR register bits WEN and WIP, but only WIP matters (in fact WEP will be set only later and only in the write function). Replace:

while ( ReadSR() & 0x3) ;                // check the two LSb WEN and WIP

with:
while ( ReadSR() & 0x1);                 // check WIP


Page 111:
at the bottom of the page a tab is missing, the last define should read:
#define    TRTS   TRISFbits.TRISF13   // Tris control for RTS pin

Page 114: at the top of the page inside the function getU2(), the RTS signal is de-asserted after the function return, making the code un-reacheable. The last two lines must be swapped as in:
          ...
          RTS = 1;                                    // de-assert RTS
          return    U2RXREG;                     // read the character from the receive buffer
} // getU2


Page 145: in step 4 of the readAD() function example the conversion is started by setting the DONE bit. This is incorrect (old PIC habit) as in the PIC24 the conversion is started by clearing the SAMP bit. Use instead:

AD1CON1bits.SAMP = 0;         // 4. Start the conversion


Page 183 and following: the Polling I/O method is described as using the RG15 input pin for the PS2 data line. This code has eventually been modified to use pin RG13 instead to simplify the development of the AV16 board. Note that the Tips and Tricks section (page 198) makes already reference to the new and correct pin selection.

Page 271: at the top of the page inside the function initMedia() both in part 4. and part 5. when de-selecting the SD card after each command (RESET and INIT) replace SDCS = 1; with the macro disableSD() previously defined (page 269), example:
    r = sendSDCmd( RESET, 0); disableSD();
This has been already corrected in the code available on the CDROM.

Page 279: the following lines of code:
// verify each block content
if ( !memcmp( data, buffer, B_SIZE))

should read:
// verify each block content
if ( memcmp( data, buffer, B_SIZE))

otherwise a mismatch would be reported incorrectly when in fact a perfect match is found.





Google