Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC16F628 and EXTERNAL eeprom

Status
Not open for further replies.

dibe84

New Member
Hi, i'm italian and i'm a new user of this forum.
I'm a problem in interfacing a 16F628 and a 24LC02 eeprom.
I use the attached routine but it don't work!! I wired the SCL and SDA pins with the RB0 and RB1 pin of the pic (SDA with the pull-up 10k resistor) and in the routine you ca see my defines of pins. When i lanch the pogram the routine:
char I2C_Send(char Address,char *Data,char Num);

(with address = 0, data = pointer to char, num = 1)
it returns 1 but the eeprom is still empty!!
Anyone can help me?!?!?!
thank you.

(sorry for my bad english!! :D :D :D )
 

Attachments

  • ms_i2c.c
    11.2 KB · Views: 252
what compiler are you using?
We used CCS-PIC in my microcontrollers class, it was full of bugs and whatnot. I tried playing around with I2c communication on my own but I couldnt seem to get it to work.
So maybe it is a compiler problem?
 
I use HI TECH PICCLITE and C language.
The compiler works, i don't have compilation errors.... I'm sure that routine return 1 (OK) because I tested it through a LED, but my eeprom is still empty...
 
Status
Not open for further replies.

Latest threads

Back
Top