CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Problem with i2c eeprom.. help me...

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
MONTECCHI lUCA
Guest







Problem with i2c eeprom.. help me...
PostPosted: Sun Jan 12, 2003 6:15 am     Reply with quote

Hi..
I have a problem..
I would like read and write from 16f84 to 24cxx,but I have some problem..
I define the pin for SCL and SDA, and i have use the CCS's driver, but when I use the function read_ext or write_ext in any address, dont write and dont read from Serial eeprom..
Why?
Anyone can help me?
THX!
___________________________
This message was ported from CCS's old forum
Original Post ID: 10624
Tomi
Guest







Re: Problem with i2c eeprom.. help me...
PostPosted: Sun Jan 12, 2003 9:23 am     Reply with quote

1. Do you have pullup resistors on both SCL and SDA?
2. Did you call init_ext_eeprom() from your early main() ?

:=Hi..
:=I have a problem..
:=I would like read and write from 16f84 to 24cxx,but I have some problem..
:=I define the pin for SCL and SDA, and i have use the CCS's driver, but when I use the function read_ext or write_ext in any address, dont write and dont read from Serial eeprom..
:=Why?
:=Anyone can help me?
:=THX!
___________________________
This message was ported from CCS's old forum
Original Post ID: 10629
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

Re: Problem with i2c eeprom.. help me...
PostPosted: Sun Jan 12, 2003 4:10 pm     Reply with quote

:=Hi..
:=I have a problem..
:=I would like read and write from 16f84 to 24cxx,but I have some problem..
:=I define the pin for SCL and SDA, and i have use the CCS's driver, but when I use the function read_ext or write_ext in any address, dont write and dont read from Serial eeprom..
-------------------------------------------------------

What compiler are you using ? CCS or CC5x ?
___________________________
This message was ported from CCS's old forum
Original Post ID: 10632
MONTECCHI lUCA
Guest







Re: Problem with i2c eeprom.. help me...
PostPosted: Mon Jan 13, 2003 3:08 am     Reply with quote

I use CCS but isn't a last version, is 3.048.
Yes,I call init_ext,but I have connect SDA and SCL to RB7 RB6 without pull-up resistor.. Is this the problem? I must use a 10k resistor?
___________________________
This message was ported from CCS's old forum
Original Post ID: 10638
MONTECCHI lUCA
Guest







Re: Problem with i2c eeprom.. help me...
PostPosted: Mon Jan 13, 2003 3:10 am     Reply with quote

CCS,but isn't last version. is 3.048
___________________________
This message was ported from CCS's old forum
Original Post ID: 10639
Tomi
Guest







Re: Problem with i2c eeprom.. help me...
PostPosted: Mon Jan 13, 2003 3:39 am     Reply with quote

Yes, you have to use 2.2kOhm or same because those pins are floating.

:=I use CCS but isn't a last version, is 3.048.
:=Yes,I call init_ext,but I have connect SDA and SCL to RB7 RB6 without pull-up resistor.. Is this the problem? I must use a 10k resistor?
___________________________
This message was ported from CCS's old forum
Original Post ID: 10640
R.J.Hamlett
Guest







Re: Problem with i2c eeprom.. help me...
PostPosted: Mon Jan 13, 2003 3:47 am     Reply with quote

:=I use CCS but isn't a last version, is 3.048.
:=Yes,I call init_ext,but I have connect SDA and SCL to RB7 RB6 without pull-up resistor.. Is this the problem? I must use a 10k resistor?

Yes. I2C, is defined as an 'open collector' drive bus. The chips, provide no 'pull up', and resistors are _required_. The actual value needed will depend on the capacitance of the lines, and the speed required. Normally a value between about 2.2K, and 4.7K, is typical. The bus 'idles' with the lines high, so power is only drawn through the resistors when data is being teansmitted. Without these, the bus will not work.

Best Wishes
___________________________
This message was ported from CCS's old forum
Original Post ID: 10642
MONTECCHI lUCA
Guest







THANKS FOR ALL!! Now read and write OK!!
PostPosted: Tue Jan 14, 2003 1:40 am     Reply with quote

THANKS FOR ALL!!
Now read and write OK!!
___________________________
This message was ported from CCS's old forum
Original Post ID: 10674
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group