WellDone/MoMo-Firmware — pull request #68 by timburke (2014-04-12 22:07:40+00:00)
Title: Switch mainboard code and bootloader to run on new hardware

The next-generation momo hardware uses a PIC24FJ64GA306 chip as its MPU. This is decently compatible with the PIC24F16KA101 but has some differences. The mainboard code and bootloader have been ported to the new hardware and this pull request tracks their status.

*It should not be merged yet* but only after integrating the sensor_log and sleep code into branch.

This PR is to show where the code is. Bootloading and mainboard code is now working on the new chip.

Major hw changes are:
- Flash is 64KB vs 16KB
- RAM is 8KB vs 1.5KB
- IO pin assignment to peripherals is done through "Peripheral Pin Select" so there are not fixed pins assigned to the SPI port for example. This is not true of I2c which for some reason does still have fixed pins.
- There is no EEPROM
- There are many more IO pins

Software changes:
- bootloader updated to not use EEPROM since there is none
- SPI code is reclocked to run at full-speed since there was no reason for it to run at 1/512th speed as had been the case until now.
- ioport.h file has macros now for manipulating ports.
- Updated code to use slightly different SPI registers in new chip.
- Made pic24 library retargetable between this chip and the previous 24F16KA101.