Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/25/08 15:51
Read: times


 
#152523 - LOL.....ok np.....now an internal save issue
Responding to: ???'s previous message
While the other block works this one does not.....I'm going batty trying to find the problem. It always stays on the same case value. The way the cases cycle it should cycle each one as the switch is pressed each time......now it stays stuck on case 00 all the time......which tells me the result is not being written into the location......using the internal eeprom.....<shaking head in shame>



void image_up(void)   //
{
unsigned char HCmode, HCvalue;
eeprom_init();  //
eeprom_read(0x015);//
HCvalue = DEEDAT;//
switch(HCmode){
    case 0x00: HCmode = 0x10; break;//
    case 0x10: HCmode = 0x11; break;//
    case 0x11: HCmode = 0x12; break;//
    case 0x12: HCmode = 0x13; break;//
    case 0x13: HCmode = 0x14; break;//
    case 0x14: HCmode = 0x15; break;//
    case 0x15: HCmode = 0x16; break;//
    case 0x16: HCmode = 0x17; break;//
    case 0x17: HCmode = 0x00; break;//
    }

eeprom_init(); 
eeprom_write(0x015, HCmode);//



List of 14 messages in thread
TopicAuthorDate
EEprom sequence.....            01/01/70 00:00      
   have you tried ...            01/01/70 00:00      
      Code was generated by code arch......            01/01/70 00:00      
   definitely not            01/01/70 00:00      
   OOOPS, I goofed            01/01/70 00:00      
   A few issues            01/01/70 00:00      
   Another look...            01/01/70 00:00      
      This block of code works as it should            01/01/70 00:00      
         already answered            01/01/70 00:00      
            LOL.....ok np.....now an internal save issue            01/01/70 00:00      
               local variables are unknown            01/01/70 00:00      
               Switching on wrong variable            01/01/70 00:00      
                  Brett your right......left over var            01/01/70 00:00      
         Should work            01/01/70 00:00      

Back to Subject List