th3gr8
Member level 4
Hello everybody ..
I am working on interfacing of IR Thermometer with PIC 16f877a .. The thermometer has 24c04 eeprom and my task is to fetch data from this eeprom chip .. I used below circuit for level shifting (but used 2n7000) .. I am using PIC CCS and My coding is:
But i dont get any character value at hyperTerminal (and only get 0 as integer) .. Please help !! ..
I am working on interfacing of IR Thermometer with PIC 16f877a .. The thermometer has 24c04 eeprom and my task is to fetch data from this eeprom chip .. I used below circuit for level shifting (but used 2n7000) .. I am using PIC CCS and My coding is:
Code:
#include <16F877A.h>
#fuses xt, nowdt, nolvp, brownout
#use delay (clock = 4Mhz)
#use rs232(baud=9600, xmit=PIN_B0, rcv=PIN_B1)
#include <2404.c>
void main()
{
unsigned char i,data;
init_ext_eeprom();
delay_ms(20);
while(1)
{
if(!input(PIN_A0))
{
for(i=1;i<=200;i++)
{
data = read_ext_eeprom(0x00+i-1);
delay_ms(10);
printf("%c %d\n\r", data,data);
}
}
}
}
But i dont get any character value at hyperTerminal (and only get 0 as integer) .. Please help !! ..