Hello people, I was wondering if anybody has much experience of PIC programming? (if you don't then I don't want to waste your time by reading on!)
I'm currently embarking on a home brew beer making device as part of a university project, it is going to have a PIC 18F4550 as its brain. The aim is to have a device that can control the beer making process over a period of time to a set of predefined specs. I have been getting to grips with PIC's over the last few days and have learnt a great deal (though there is still tons more) and I had a few questions about the best way to do some things. I am programming in the C18 compiler that comes with MPLAB and have got to the light flashing and button sensing stage.
My main question is about USB interfacing, I want to be able to modify the settings of the device via USB so that you can easily change the brewing time/temperature/... by just plugging the device into a computer. I am currently running with a USB bootloader on the chip so that it is easy to reprogram the PIC having recompiled the source code. However, if this was ever used by somebody other than a PIC expert it would be far from easy so I want to have USB communcations such that a PC application can quickly change the values of certain variables. Is it possible to change variables that are stored in the PIC between power cycles, or is it just the firmware that remains after a reset? In which case I guess I would also need an SD card or something in order to store information which then adds further complication. Anyway, to stop myself waffling I would love to know the best way to change variables in the PIC such that the timer can be modified easily from USB (or will the source just need recompiling/flashing?)?
Another question was about the timing of the processes, I am currently planning on using interrupts to measure time and ensure that temperatures are kept accurate. Is 1 second a reasonable period of time for the interrupt such that it can measure time over a period of several days yet also do it over an hour or so.
Really not sure where to start with designing and planning things so would be great to discuss with somebody who has a clue! At least Ive managed to get the PIC to a stage where C programming is possible, slow but steady!
Thanks