void off(char i) {
if(current_value[i] >= MIN) { // si el valor nuevo en menor que MIN
new_value[i] = APAGADO; // cargamos valor de OFF (0x00)
last_value[i] = current_value[i]; // Guarda último valor de dimmer en RAM
if(last_value[i] != read_EEPROM(i)) { // Si el último valor cambió al de la EEPROM
write_eeprom (i, last_value[i]); // entonces lo guarda
}
canal[i].off_action = 0; // trabajo realizado, desactivamos flag de apagado
}
}
These devices have 256 bytes of data EEPROM withan address range from 0h to 0FFh.
Si quiero grabar en la quinta posición, cual debería ser la dirección??
Debería usar algun #ORG para reservar memoria?? Talvez esté mezclando las cosas, soy novato en el tema!
>>> Warning 207 "mTouch-16F1826.c" Line 91(1,1): Code has no effect
--- Info 300 "mTouch-16F1826.c" Line 319(1,2): More info: Segment at 00000-00000 (0001 used) Priv
--- Info 300 "mTouch-16F1826.c" Line 319(1,2): More info: Segment at 00001-007FF (0000 used)
--- Info 300 "mTouch-16F1826.c" Line 319(1,2): More info: Attempted to create: 00000-00002 for reset
*** Error 126 "mTouch-16F1826.c" Line 319(1,2): Invalid ORG range
>>> Warning 228 "mTouch-16F1826.c" Line 13(31,32): Memory not available at requested location -- getnev
*** Error 27 "mTouch-16F1826.c" Line 13(31,32): Expression must evaluate to a constant
*** Error 43 "mTouch-16F1826.c" Line 13(31,32): Expecting a declaration
*** Error 43 "mTouch-16F1826.c" Line 13(32,33): Expecting a declaration
*** Error 43 "mTouch-16F1826.c" Line 13(33,34): Expecting a declaration
*** Error 43 "mTouch-16F1826.c" Line 13(34,35): Expecting a declaration
*** Error 43 "mTouch-16F1826.c" Line 13(35,36): Expecting a declaration
6 Errors, 1 Warnings.
Build Failed.>>> Warning 228 "mTouch-16F1826.c" Line 11(20,21): Memory not available at requested location
>>> Warning 207 "mTouch-16F1826.c" Line 90(1,1): Code has no effect
>>> Warning 216 "mTouch-16F1826.c" Line 318(1,2): Interrupts disabled during call to prevent re-entrancy: (@MUL88)
>>> Warning 216 "mTouch-16F1826.c" Line 318(1,2): Interrupts disabled during call to prevent re-entrancy: (USART_activa_tx)
>>> Warning 216 "mTouch-16F1826.c" Line 318(1,2): Interrupts disabled during call to prevent re-entrancy: (USART_activa_rx)
>>> Warning 216 "mTouch-16F1826.c" Line 318(1,2): Interrupts disabled during call to prevent re-entrancy: (@delay_ms1)
>>> Warning 228 "mTouch-16F1826.c" Line 318(1,1): Memory not available at requested location
Memory usage: ROM=66% RAM=21% - 27%
0 Errors, 7 Warnings.
Build Successful.The physical address range of the 256 byte data memory is 0000h-00FFh. However, these addresses are logically mapped to address 1E000h-1E1FFh in the hex file.La direcciones fisicas son de 0000 a 00FF, pero que la logica es de 1E000 a 1E1FF