For some reason the eeprom does seem to respond right, it seems like no matter what I do I only get an $ff/ 11111111 back unless I'm missing something major in the literature it should go like this for a read cycle:
1. I2C start
2. Master sends a 7 bit address (0000000 through 1111111) with the 8th bit being read/write which would be a 1 cause we are reading
3. Slave sends an Ack which is pulling the line low
4. Slave sends a byte back
5. Master keeps the line high to signal no Ack
6. Master sends a stop
Questions:
Is all that above right? Am I addressing the eeprom right? an ideas on where my code is wrong?
Thank You for the EEPROM I2C Applications. This is A great help to Me. I was gonna post a "new topic" on this, And Boom their it was on the forum.
Its Your "I'll show You" approach, That I like most. From this I learn the most!!!...Your REM statements tell Me whats going on in the code.I learn from this and advance to higher levels of programing code with the BS2 series. Thanks Again
__________________$WMc%_________________Happy New Year
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Truth is out there·········································· E=$WMc%2
Comments
Everything looks right to me unless I missed something, any ideas?
Post Edited (basejumper9) : 3/20/2007 7:16:55 PM GMT
1. I2C start
2. Master sends a 7 bit address (0000000 through 1111111) with the 8th bit being read/write which would be a 1 cause we are reading
3. Slave sends an Ack which is pulling the line low
4. Slave sends a byte back
5. Master keeps the line high to signal no Ack
6. Master sends a stop
Questions:
Is all that above right? Am I addressing the eeprom right? an ideas on where my code is wrong?
I need to write an Slave_Byte and a Control_Byte to program it and I need to read it Like Slave_byte, Data_byte1, Data_byte2.
How should I write this program???
I2COUT SDA, Slave_Byte, [noparse][[/noparse]Control_Byte]
I2CIN SDA, Slave_Byte, [noparse][[/noparse]result1, result2] ??????
Need help!!!!
Thank You for the EEPROM I2C Applications. This is A great help to Me. I was gonna post a "new topic" on this, And Boom their it was on the forum.
Its Your "I'll show You" approach, That I like most. From this I learn the most!!!...Your REM statements tell Me whats going on in the code.I learn from this and advance to higher levels of programing code with the BS2 series. Thanks Again
__________________$WMc%_________________Happy New Year
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Truth is out there·········································· E=$WMc%2
Post Edited ($WMc%) : 1/3/2009 6:38:39 AM GMT