notes for pic18Test project, dvb 08 This is a little scratchpad project for understanding parts of the Pic 18F4550 and PICDME FS USB demo board. Things I've Learned MCC18 adds keyword "overlay" for semi-static variables also rom char * for pointers into data memory The examples put reset and irq vectors up at 0x800. But the chip really has them at 0. IF you have the boot loader installed, then that bit of code forwards the irq. But since I don't, I need to include vectors at 0x8 and 0x18. The boot loader fits in 2k, and is a very stripped-down usb implementation. At 12 mips, the clock divided by 46875 is 1/256th of a second. So, incrementing a word at that rate gives you both a reasonable high(ish) res timer (256ths, about 4ms) and a spot-on seconds ticker, in adjacent bytes. PICDEM FS USB board port usages... RA0 -- on-board potentiometer RA1, RA2 -- hooked up to monitor power, usb in? something... ra1 can be used, but pulling low triggers usb sleep... RA2 -- drives max rs232, or cut trace JP6 to use RA3 -- driven from max rs232, or cut trace JP4 to use RA4 -- open RA5 -- open (AN4) (ra6, mentioned in datasheet, no pin) RB0, RB1, RB2 -- spi to thermometer? RB3 -- open RB4, RB5 -- buttons on board RB6, RB7 -- ISCP, open when programming cable removed RC0 -- USB Sleep RC1 -- open RC2 -- open RC3 -- not exist RC4, RC5 -- USB RC6 -- drives max rs232, cut trace jp5 to use RC7 -- driven from rs232, cut trace jp3 to use RD0, RD1, RD2, RD3 -- LEDs on board RD4, RD5, RD6, RD7 -- open RE0, RE1, RE2 -- open Pins available on connector: RA1 RB3 RB6 -- after cable removed RB7 -- after cable removed RC1 RC2 RC6 RC7