|
|
View previous topic :: View next topic |
Author |
Message |
Mark DSylva Guest
|
looking for h/w i2c master example |
Posted: Tue Jan 07, 2003 4:18 pm |
|
|
Hi,
I'm looking for an example which uses the h/w I2C in master mode. I wrote some code and expected to see some activity on the SCLK and SDATA lines but the they are always high.
Mark
___________________________
This message was ported from CCS's old forum
Original Post ID: 10519 |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
Re: looking for h/w i2c master example |
Posted: Tue Jan 07, 2003 5:14 pm |
|
|
:=Hi,
:=I'm looking for an example which uses the h/w I2C in master mode. I wrote some code and expected to see some activity on the SCLK and SDATA lines but the they are always high.
-----------------------------------------------
1. What version of the compiler do you have ?
2. What PIC do you have ?
Those are the first two things to check when H/W i2c doesn't
work.
Here is a previous post, regarding the compiler version issue:
<a href="http://www.pic-c.com/forum/general/posts/10231.html" TARGET="_blank">http://www.pic-c.com/forum/general/posts/10231.html</a>
Here is a post, regarding the type of PIC that you're using:
<a href="http://www.pic-c.com/forum/general/posts/8499.html" TARGET="_blank">http://www.pic-c.com/forum/general/posts/8499.html</a>
Assuming that your version of the compiler supports it,
here is a test program. You will have to un-comment
the line that enables H/W i2c, and comment out the line
for software i2c.
<a href="http://www.pic-c.com/forum/general/posts/8281.html" TARGET="_blank">http://www.pic-c.com/forum/general/posts/8281.html</a>
If your version of the compiler doesn't support H/W i2c
then this program can be used:
<a href="http://www.pic-c.com/forum/old/messages/725.html" TARGET="_blank">http://www.pic-c.com/forum/old/messages/725.html</a>
___________________________
This message was ported from CCS's old forum
Original Post ID: 10521 |
|
|
Mark DSylva Guest
|
Re: looking for h/w i2c master example |
Posted: Tue Jan 07, 2003 9:00 pm |
|
|
:=:=Hi,
:=:=I'm looking for an example which uses the h/w I2C in master mode. I wrote some code and expected to see some activity on the SCLK and SDATA lines but the they are always high.
:=-----------------------------------------------
:=
:=1. What version of the compiler do you have ?
:=
The version is quite recent : 3.130
:=2. What PIC do you have ?
I am using a PIC 18F452 and an ICE2000 emulator.
I'm going to try your suggestion and report back if I have success or not.
Thanks
Mark
:=
:=Those are the first two things to check when H/W i2c doesn't
:=work.
:=
:=Here is a previous post, regarding the compiler version issue:
:= <a href="http://www.pic-c.com/forum/general/posts/10231.html" TARGET="_blank"> <a href="http://www.pic-c.com/forum/general/posts/10231.html" TARGET="_blank">http://www.pic-c.com/forum/general/posts/10231.html</a></a>
:=
:=Here is a post, regarding the type of PIC that you're using:
:= <a href="http://www.pic-c.com/forum/general/posts/8499.html" TARGET="_blank"> <a href="http://www.pic-c.com/forum/general/posts/8499.html" TARGET="_blank">http://www.pic-c.com/forum/general/posts/8499.html</a></a>
:=
:=Assuming that your version of the compiler supports it,
:=here is a test program. You will have to un-comment
:=the line that enables H/W i2c, and comment out the line
:=for software i2c.
:= <a href="http://www.pic-c.com/forum/general/posts/8281.html" TARGET="_blank"> <a href="http://www.pic-c.com/forum/general/posts/8281.html" TARGET="_blank">http://www.pic-c.com/forum/general/posts/8281.html</a></a>
:=
:=If your version of the compiler doesn't support H/W i2c
:=then this program can be used:
:= <a href="http://www.pic-c.com/forum/old/messages/725.html" TARGET="_blank"> <a href="http://www.pic-c.com/forum/old/messages/725.html" TARGET="_blank">http://www.pic-c.com/forum/old/messages/725.html</a></a>
___________________________
This message was ported from CCS's old forum
Original Post ID: 10527 |
|
|
|
|
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
|