Forums

Help with the I2C bus on the C6713 DSP

Started by thamiral August 19, 2004
Hello everyone,

I am trying to use my C6713 to write to an I2C EEPROM (Model:M24C02 -
Addr: 0xA0 - Only device on the bus) but can't seem to be able to
successfully perform a write cycle. While I was debugging using a
Scope, I had realized that the 8th Bit of my "Device Select"
transmission from the Master (C6713) is always high no matter which
mode I am in (Master Recieve or Master Transmit) Please see attached
graph.

I also noticed that there are 3 bytes that get transmitted when there
should only be Two.

I would really appreciate it if anyone can help me with this
issue ... I am also including my test code should anyone be able to
pin point my error or even send some sample code.

Thanks a lot.



Hi Thami,
 
U  will be enabling a start bit before writing the device address that means this bit will be set until u send a stop signal, So check properly whether  this bit is getting reset by any means,since u require this to say ur DSP to be master untill u finish writing all data to ROM.And when u write a single byte at the 9th clock pulse just observe is there any ACK from ROM, if u r able to write completely 1 byte properly u will be ACk'd by ROM.
Since its a single device communicating on the I2C bus ensure all ur writings are proper by single step execution.
Mean while if ur SDA line is high irespective of anything may be u will have to check out the design schematics of ur target board.
 
-Mann
Bangalore
India


thamiral <t...@uwo.ca> wrote:
Hello everyone,

I am trying to use my C6713 to write to an I2C EEPROM (Model:M24C02 -
Addr: 0xA0 - Only device on the bus) but can't seem to be able to
successfully perform a write cycle. While I was debugging using a
Scope, I had realized that the 8th Bit of my "Device Select"
transmission from the Master (C6713) is always high no matter which
mode I am in (Master Recieve or Master Transmit) Please see attached
graph.

I also noticed that there are 3 bytes that get transmitted when there
should only be Two.

I would really appreciate it if anyone can help me with this
issue ... I am also including my test code should anyone be able to
pin point my error or even send some sample code.

Thanks a lot.

_____________________________________
Note: If you do a simple "reply" with your email client, only the author of this message will receive your answer. You need to do a "reply all" if you want your answer to be distributed to the entire group.

_____________________________________
About this discussion group:

To Join: Send an email to c...@yahoogroups.com

To Post: Send an email to c...@yahoogroups.com

To Leave: Send an email to c...@yahoogroups.com

Archives: http://www.yahoogroups.com/group/c6x

Other Groups: http://www.dsprelated.com

Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/c6x/

<*> To unsubscribe from this group, send an email to:
c...@yahoogroups.com

<*



Hello Mann,

Thanks for your response...

I think I had forgotten to include the code and the results that I am currently
getting ...

Mann, these files should shed light on how I am trying to implement the I2C
protocol and I think it does match the description that you had provided in
your response...

I do look forward to hearing from you now that you have my results...

Sincerely,

----------------------------
Taha Amiralli University of Western Ontario

Electrical Engineering Support
Canadian Arrow, Electrical Engineering team
www.canadianarrow.com

Sunstang Solar Array Manager
SunStang Solar Car Project, Electrical Team
http://hyperserver.engga.uwo.ca/sunstang/ Quoting manie dinchob <>:

> Hi Thami,
>
> U will be enabling a start bit before writing the device address that means
> this bit will be set until u send a stop signal, So check properly whether
> this bit is getting reset by any means,since u require this to say ur DSP to
> be master untill u finish writing all data to ROM.And when u write a single
> byte at the 9th clock pulse just observe is there any ACK from ROM, if u r
> able to write completely 1 byte properly u will be ACk'd by ROM.
> Since its a single device communicating on the I2C bus ensure all ur writings
> are proper by single step execution.
> Mean while if ur SDA line is high irespective of anything may be u will have
> to check out the design schematics of ur target board.
>
> -Mann
> Bangalore
> India > thamiral <> wrote:
> Hello everyone,
>
> I am trying to use my C6713 to write to an I2C EEPROM (Model:M24C02 -
> Addr: 0xA0 - Only device on the bus) but can't seem to be able to
> successfully perform a write cycle. While I was debugging using a
> Scope, I had realized that the 8th Bit of my "Device Select"
> transmission from the Master (C6713) is always high no matter which
> mode I am in (Master Recieve or Master Transmit) Please see attached
> graph.
>
> I also noticed that there are 3 bytes that get transmitted when there
> should only be Two.
>
> I would really appreciate it if anyone can help me with this
> issue ... I am also including my test code should anyone be able to
> pin point my error or even send some sample code.
>
> Thanks a lot. >
>
> _____________________________________
> Note: If you do a simple "reply" with your email client, only the author of
> this message will receive your answer. You need to do a "reply all" if you
> want your answer to be distributed to the entire group.
>
> _____________________________________
> About this discussion group:
>
> To Join: Send an email to
>
> To Post: Send an email to
>
> To Leave: Send an email to
>
> Archives: http://www.yahoogroups.com/group/c6x
>
> Other Groups: http://www.dsprelated.com
>
> Yahoo! Groups Links >
>
> ---------------------------------
Attachment (not stored)
graphs.pdf
Type: application/pdf

Attachment (not stored)
main_c.pdf
Type: application/pdf