for(i=1;i<7;i++){
printf(lcd_putc,"%2X",Llave[7-i]);
}
write_ext_eeprom(0,Llave[i]);
Creo que no estas captando el punto o yo no te entiendo.De hecho en el 16F877 si se muestran todos los caracteres normalmente, pero es en el 18F4550 donde no lo hace.
Amos por pasos.
En la rutina de interrupción realizas la lectura de los 64 bits del Id del ibutton (8 bytes) correcto? Y asignas ese id leído en Llave[0] a Llave[7] correcto
Luego lo primero que muestras en la LCD la familia y el valor del CRC que son las variables Lave[0] y Llave[7] respectivamente. Aquí surge la primera pregunta, estos dos valores se muestran correctamente?
Luego después de mostrar la familia y el crc, muestras el resto del ID del ibutton, Llave[6] a Llave[1]. Aquí surge la siguiente la pregunta: Se muestra correctamente el ID en el LCD?
#include <18F4550.h>
#device ADC=10
#FUSES NOFCMEN //Fail-safe clock monitor disabled
#FUSES NOIESO //Internal External Switch Over mode disabled
#FUSES PUT //Power Up Timer
#FUSES NOBROWNOUT //No brownout reset
#FUSES NOVREGEN //USB voltage regulator disabled
#FUSES NOPBADEN //PORTB pins are configured as digital I/O on RESET
#FUSES NOLVP //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
#FUSES NOXINST //Extended set extension and Indexed Addressing mode disabled (Legacy mode)
#use delay(crystal=20000000)
#define LCD_ENABLE_PIN PIN_D3 ////
#define LCD_RS_PIN PIN_D1
#define LCD_RW_PIN PIN_D2 ////
#define LCD_DATA4 PIN_D4 ////
#define LCD_DATA5 PIN_D5 ////
#define LCD_DATA6 PIN_D6 ////
#define LCD_DATA7 PIN_D7 ////
#include <LCD.C>
#include <TOUCH.C>
int8 Llave[8];
int8 valor,i;
void main()
{
//enable_interrupts(INT_EXT);
//enable_interrupts(GLOBAL);
lcd_init();
printf(lcd_putc,"Inserte Llave");
while(TRUE)
{
if(touch_present()==1)
{
touch_write_byte(0x33);
for(i=0;i<8;i++)
{
Llave[i]=touch_read_byte();
}
printf(lcd_putc,"\fFlia: %2x CRC: %2X\nid: ",Llave[0],Llave[7]);
for(i=1;i<7;i++)
{
printf(lcd_putc,"%2X",Llave[7-i]);
}
delay_ms(1000); //Delay para alcanzar a visualizar el ID del ibutton
printf(lcd_putc,"\fInserte Llave");
}
}
}
:oops: elreypic2 , Disculpa pero probé tu código y no funciono, te dejo foto.
.....
#INT_EXT
void cambioB2(){
init_ext_eeprom();
valor=read_ext_eeprom(0); <<<<<<<<<<<<<< acá
touch_write_byte(0x33);
for(int i=0;i<8;i++){ #INT_EXT
void cambioB2(){
init_ext_eeprom();
valor=read_ext_eeprom(0);
reset_pulse() ; <<<<<<<<<<<<< inserto un reset.
touch_write_byte(0x33);
for(int i=0;i<8;i++){