Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

TC74 Interfacing with PIC18F452

Status
Not open for further replies.

syeda amna

Full Member level 4
Joined
Jun 1, 2010
Messages
222
Helped
24
Reputation
48
Reaction score
22
Trophy points
1,308
Location
Pakistan
Activity points
2,551
hi

I am trying to interface TC74 with PIC. it is not working. What is wrong with the code?

LCD.JPG

Code:
#include <18F452.h>   
#use delay (clock=4M) 
#include <flex_for_test_lcd.c>  //LCD driver
#fuses HS,NOLVP,NOWDT 
#fuses XT                     //for crystal
#use I2C(scl=PIN_C3, sda=PIN_C4) 



void main(){

int16 temp;

//LCD

output_low(PIN_E2);
lcd_init();
lcd_putc("Temperature:");
    

//I2C

i2c_start();    // Start condition
i2c_write(0x9A); //device Address 0x9A
i2c_Write(0x00);  

i2c_start(); 
i2c_Write(0x9B);  
temp = i2c_Read(0);
i2c_stop();     // Stop condition

printf(lcd_putc, "%lu" temp);

}
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top