no no no gente, investigando mas,,,no es un bug, lo q pasa es q cuando se habilita interrupcion por cambio de nibble, para esta interrupcion no se especifica si el cambio es de 0 a 1 ó de 1 a 0, es por eso qse hace necesario incluir una rutina ya sea de lectura o escritura, es para dejarle fijado al micro el estado de los bit y de esta manera pueda darse cuenta de q hubo un cambio en el nibble.
esta es la cita textual de donde saque la info
"interrupcion por cambio de estado en las entradas RB4-RB7. se deshabilita mediante el bit RBIE del registro INTCON.cuando en cualquiera de las entradas RB4-RB7 se produce un cambio de estado logico respecto al ultimo valor leido en las mismas, el flag RBIF del registro INTCON refleja dicho suceso. para poner esta interrupcion es necesario leer el puerto B de entrada y registrar el nuevo valor de RB4-RB7 asi como poner a 0 el bit RBIF.
otra cosa,,en el datasheet si esta especificada dicha rutina tambien
aqui esta la cita:
"Four of PORTB’s pins, RB7:RB4, have an interrupt-onchange
feature. Only pins configured as inputs can
cause this interrupt to occur (i.e., any RB7:RB4 pin
configured as an output is excluded from the interrupton-
change comparison). The input pins (of RB7:RB4)
are compared with the old value latched on the last
read of PORTB. The “mismatch” outputs of RB7:RB4
are OR’ed together to generate the RB Port Change
Interrupt with flag bit RBIF (INTCON<0>).
This interrupt can wake the device from SLEEP. The
user, in the Interrupt Service Routine, can clear the
interrupt in the following manner:
a) Any read or write of PORTB. This will end the
mismatch condition.
b) Clear flag bit RBIF.
A mismatch condition will continue to set flag bit RBIF.
Reading PORTB will end the mismatch condition and
allow flag bit RBIF to be cleared.
The interrupt-on-change feature is recommended for
wake-up on key depression operation and operations
where PORTB is only used for the interrupt-on-change
feature. Polling of PORTB is not recommended while
using the interrupt-on-change feature."
esta claro no..??
