
Originally Posted by
tico
What I would like to do is use a few switches and/or a serial port to change the setting of the thermostat ie. Mode Summer/Winter, High Set Point, Low Setpoint and cant seem to find any code samples.
How do you store settings in a PIC and use a switch input to change those settings.
.
Hi,Tico
First you'll have to choose how to "poll" the request for changes ...
Interrupts looks the easiest way , as interrupts on port change, and interrupt on USART receive already exist aboard your PIC !!!
Then, just decide which coding you'll choose for the differents parameters ( serial input ) , and which menu you'll write for button programming ... looks a LCD could be useful here ...
After that, when the "valid" switch pushed or serial code will be received, just write parameters to their respective EEPROM locations ...
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Bookmarks