PDA

View Full Version : Programming on board memory



Rob Martin
- 5th June 2005, 09:10
I'm sure I've asked this before but I can find the answer in the archieves.

I have a project based on the 16f877 with 2 x RS232 ports one of which is used as a boot loader the other one is just spare.
I store 50 user changable paramaters using the data command and read these at startup.

I want to allow the end user to read and change these paramaters and make a backup if required.

So my questions are these.

Can I use the mechanique bootloader to just read and write the ee2 memory or is it easier just to write a routine to read the 50bytes of data and send these out on the rs232 as a string, read this into a VB program then send the string back and just have pbp save the entire string using the data command?

Rob

mister_e
- 5th June 2005, 09:19
easy way, use VB and keep the Bootloader circuit on your target board.

With VB you can enable/disable the DSR or DTR line(i'm too lazy to check wich one now). The trick is quite simple.

In VB, enable the DXX line, that will RESET your PIC, disable the line, and send your commands to read the PIC EEPROM.

In your PIC CODE, use a HSERIN with a timeout label. If after a X delay you don't receive the PC command, continue to the main program else, do your EEPROM upload/download stuff.