Go to advanced search

by chwill210
Fri Feb 26, 2016 12:36 am
Forum: Troubleshooting
Topic: Problem writing to 24LC256 using i2c and SMBUS
Replies: 8
Views: 3196

Re: Problem writing to 24LC256 using i2c and SMBUS

Thanks Joan! This code did the trick. I found a slight issue with the read code I posted originally, so this is the final python code I am using to read and write word data to my 24LC256 EEPROM: import smbus address = 0x50 # 24LC256 i2c address - no address pins connected regmsbyte = x #most signifi...
by chwill210
Wed Feb 24, 2016 2:07 am
Forum: Troubleshooting
Topic: Problem writing to 24LC256 using i2c and SMBUS
Replies: 8
Views: 3196

Re: Problem writing to 24LC256 using i2c and SMBUS

From Microchip's datasheet, the required 24LC256 transaction is straightforward (as best I can tell): S i2caddress Wr [A] regmsbyte [A] reglsbyte [A] datalsbyte [A] datamsbyte [A] P I tried the following block: address = 0x50 writestring = [regmsbyte, reglsbyte, datalsbyte, datamsbyte] regmode = 0x0...
by chwill210
Tue Feb 23, 2016 2:25 am
Forum: Troubleshooting
Topic: Problem writing to 24LC256 using i2c and SMBUS
Replies: 8
Views: 3196

Re: Problem writing to 24LC256 using i2c and SMBUS

Thanks for the quick reply Joan! So I tried the following code: import smbus address2 = 0x50 # i2c bus address only i2cmsbyte = 0 i2clsbyte = 24 # Writes to EEPROM address 24 eevaluemsbyte = 1 eevaluelsbyte = 4 # word value = 260 bus.write_byte(address,i2cmsbyte) bus.write_byte(address,i2clsbyte) bu...
by chwill210
Sun Feb 21, 2016 5:04 pm
Forum: Troubleshooting
Topic: Problem writing to 24LC256 using i2c and SMBUS
Replies: 8
Views: 3196

Problem writing to 24LC256 using i2c and SMBUS

Hi All. I cannot get my Pi2 to write to a 24LC256 EEPROM with SMBUS. I am a novice to the Pi and to i2c communication. So operator error is highly suspected! I believe the EEPROM is working fine. I can read/write to it flawlessly using a PICAxe chip. I am pretty sure I have the Pi set up correctly a...

Go to advanced search