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.

communication between 16F877a and 24LC04B (external EEPROM) use i2c protocol??

Status
Not open for further replies.

slurp

Newbie level 6
Joined
Apr 19, 2011
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,491
Hello to all edaboard-ians,

Would like to ask some questions with regards to the above topic.
I am trying my hands on connecting and write/read between the PIC16F877a and the External EEPROM 24LC04B.

However, I DO NOT how to starts its I2C program/protocol.

Q1) To communicate between the PIC16F877a and the 24LC04B.
Is it necessary to have i2c protocol? [YES/NO]

Q2) I2C protocol refers to pulling HIGH/LOW the pins SDA and SCL? [YES/NO]

Q3) Is ti advisable to use Assembly Language (asm) or CCS (c-programming)?

Q4) any helpful sites?

I know, some may advise me to do more research and read-up. I did and still am doing then now...
I believe EDABOARD-ians would be another great source of information and help.

Thanking you in advance.

cheers,
slurp
 

A1. For any external eeprom communication I2c is required unless it supports SPI or any other protocol.
A2. Its not only pulling of the lines but the protocol has to be understood properly.
A3. Better to write it in C as it can be easy for tracing and understanding.. but you can also do it in asm..

**broken link removed**

---------- Post added at 12:16 ---------- Previous post was at 12:16 ----------

Here are some inforation from Micochip website

**broken link removed**

Here is the assembler code example

**broken link removed**

And here is more information from Microchip website about i2c

https://ww1.microchip.com/downloads/en/DeviceDoc/i2c.pdf
 

Good-day ckshivaram,
Thank you for the detailed answers.

However, I tried to open your shared Tutorial 10 file, but i could not using MPLAB IDE.
Should I instead open it with the CCS?

What would you suggest for me to verify/see the External EEPROM's memory? Else How am I able to know it is successfully written and read correctly?

cheers.
Slurp
 

This tutorial help you to understand I2C [Generic {Whatever the slave devices}] clearly...
 

Attachments

  • I2C.pdf
    362.7 KB · Views: 108

This tutorial help you to understand I2C [Generic {Whatever the slave devices}] clearly...


Hi kandhu... What tutorial are you referring to? the one shared by CK?


cheers,
slurp
 

That also useful... I am telling which is attached by me [I2C.pdf]... Both You can refer.... What i have attached is Generic I2C protocol..[Not specific to any particular slave devices..]
 

That also useful... I am telling which is attached by me [I2C.pdf]... Both You can refer.... What i have attached is Generic I2C protocol..[Not specific to any particular slave devices..]


I am sorry Kandhu,

But I do not see any attachments of yours.

Anyhow, I would like to ask.
What are the CONFIG for 16F877 and 16F877a?
I am sure they are different, but I do not seem to get it from the datasheet.

cheers,
slurp
 

**broken link removed**

Here is the assembler code example

**broken link removed**

And here is more information from Microchip website about i2c

https://ww1.microchip.com/downloads/en/DeviceDoc/i2c.pdf[/QUOTE]

Hi,
I want to thank you for sharing with me the above links.

I read the presentation by Microchip on the EEPROM AND THE pic INTERLINKING. (I2C)

I noticed that they only provide an example that write and read a ADDRESS AND DATA/..

i AM TRYING OUT TO write and read SEVERAL DATAsss.....by editing from the example given by microchip and added into it some looping.

Could you be of great help and assitance pleasE?

thanking you in advance.

cheers,
Natasha
 

dear slurp


CCS have a lot of helpfull examples ready-to-use concerning I2C memories ( 24Cxx ) once you had installed it to your PC.
Make a search on Help and examples folder.

+++
 

you will be easy to do it while you are doing it, therefore please install mikroC PRO for PIC and then you can see library Manager
and click I2C you will see lot of easy guide with cct
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top