|
|
View previous topic :: View next topic |
Author |
Message |
MONTECCHI lUCA Guest
|
Problem with i2c eeprom.. help me... |
Posted: Sun Jan 12, 2003 6:15 am |
|
|
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... |
Posted: Sun Jan 12, 2003 9:23 am |
|
|
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
|
Re: Problem with i2c eeprom.. help me... |
Posted: Sun Jan 12, 2003 4:10 pm |
|
|
:=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... |
Posted: Mon Jan 13, 2003 3:08 am |
|
|
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... |
Posted: Mon Jan 13, 2003 3:10 am |
|
|
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... |
Posted: Mon Jan 13, 2003 3:39 am |
|
|
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... |
Posted: Mon Jan 13, 2003 3:47 am |
|
|
:=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!! |
Posted: Tue Jan 14, 2003 1:40 am |
|
|
THANKS FOR ALL!!
Now read and write OK!!
___________________________
This message was ported from CCS's old forum
Original Post ID: 10674 |
|
|
|
|
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
|