The Godfather talking
This is god damn my place! Capisci?
Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
April 28, 2024, 11:33:14 23:33


Login with username, password and session length


Pages: [1]
Print
Author Topic: Mikroc - Need help with ext eeprom access?  (Read 4904 times)
0 Members and 1 Guest are viewing this topic.
jaikumar
Junior Member
**
Offline Offline

Posts: 45

Thank You
-Given: 47
-Receive: 18


« on: September 05, 2007, 06:51:43 06:51 »

Using eeprom 24c08 with pic 16f684 portc bits for sda and scl. Mikroc software i2c library

    Soft_I2C_Config(&PORTC,5,4);
    Soft_I2C_Start();
    Soft_I2C_Write(0xA0);
    Soft_I2C_Write(0x01);  // high byte
    Soft_I2C_Write(0xC0); // Low byte
    Soft_I2C_Start();
    Soft_I2C_Write(0xA1);
    eeres = Soft_I2C_Read(0u);
    Soft_I2C_Stop();

Iam able to get data if only for a byte address. but when i want to access word address this program fails? Why?

« Last Edit: September 05, 2007, 01:11:57 13:11 by jaikumar » Logged
jaikumar
Junior Member
**
Offline Offline

Posts: 45

Thank You
-Given: 47
-Receive: 18


« Reply #1 on: September 05, 2007, 01:12:39 13:12 »

ANSWER
24C08 has 8192 Bits = 8192/8 = 1024 Bytes
24C08 has address A and the bit 0 is used to access the first 1024/4 = 256 bytes and A2 to access the next 256 and so on.

GoodLuck.
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC