![]() | ![]() | ![]() |
| | |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| Hi, I am have a few problems using multiple external eeproms with my PIC18F4620. I thought I would first check to make sure I have the hardware correct. When I connected 1 Eeprom, with I2C, everything worked fine. I set the address of it to be 0 (tied the address bits to GND) and then put pullups on the SCL and SDA lines and it worked fine. I then added a total of 5 Eeproms and made the address bits 0 through 4. I just daisy chained the wires from the first SCL/SDA through the rest of the EEproms with no extra pullups - this is correct isn't it? Now when I go to read from the different EEproms the PIC hangs and the WDT kicks in. Does anyone have a circuit for connecting multiple I2C components on to 1 PIC? Or am I doing it right? Thanks, Craig | |
| |
| | (permalink) |
| The way you are connecting them is correct. You don't state which EEPROM you are using, if it is the 1Meg ones then this maybe your problem as you can only have 4 of these on the same bus. Address line A2 has to be held high for it to work. If you require 8 chips then A2 can be used as a chip select to bank in 4 at a time. I assume that your pullups are the correct value - 10k for 100kHz and 2k for 400kHz. Mike. | |
| |
| | (permalink) |
| Thanks, I am using the 24FC64 with a 1K pullup since it runs at 1Mhz (is that correct?). Last edited by richacm; 22nd July 2008 at 12:40 AM. | |
| |
| | (permalink) |
| I only have the 24FC1025 datasheet handy and that states 2k for 400kHz and 1MHz. Another thought, if the problem is intermittent it could be due to being in development. If you happen to stop the pic during a transfer the bus can hang. This happens very easily is you are constantly compiling as this stops the processor in a random position. You can check for this problem at the start of your code, at startup both SCL and SDA should be high. If you find SDA is low then manually clock SCL until SDA goes high. Mike. | |
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Title | Starter | Forum | Replies | Latest |
| connecting multiple temperature sensors to a pocket pc | raindelay | Electronic Projects Design/Ideas/Reviews | 16 | 26th August 2007 06:45 AM |
| serial EEPROMs larger than 512K? | kcn | Micro Controllers | 2 | 14th March 2005 09:17 AM |
| connecting GPS and GSM | jijoyattitude | Electronic Projects Design/Ideas/Reviews | 2 | 13th January 2004 02:33 PM |
| connecting GPS and GSM | jijoyattitude | Micro Controllers | 4 | 13th January 2004 03:14 AM |
| eeproms | thunderbelly | General Electronics Chat | 1 | 20th April 2003 08:08 PM |