Well the boot loader worked, at least it would come up and the PC would recognize that it was in bootload mode. I could then load a file and program it. So it all looked good. But resetting the device only brought back the bootloader. Since the bootloader was compiled hex code from a previous project, getting into it to see what was happening was going to be problematic. Besides I would have to get the professional version of the XC8 compiler to make it fit in the required space. Not something I wanted to do at this point, even for a month.
Looked at the source code to see if I could get any hints as to what was happening and compared the schematic against the one from the project the bootloader came from. And that is when the light bulb went on or the load of bricks hit me (the later being more apropos considering what this is intended for).
To force the PIC into the bootloader mode you need to hold down the push button connected to RB2. Reading a low then causes the bootloader firmware to enter bootloader mode, otherwise it will just launch the program at 0x1000. Well like any pushbutton implementation there is a pullup resistor to force the input high when the button is not pressed. And....................it was not installed. Put the resistor in and everything works the way you would expect.
Now I am off to building all of the required infrastructure (I2C, EEPROM, Timers, LP5569 driver, etc) to make the device functional.
No comments:
Post a Comment