View previous topic :: View next topic |
Author |
Message |
NAVID
Joined: 14 Jun 2017 Posts: 28
|
i2c |
Posted: Thu Jul 27, 2017 8:10 pm |
|
|
hi
I'm new on micro controllers and i want to learn i2c.
if anybody have simple and useful educate plz show me.
Thanks all (: |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Thu Jul 27, 2017 9:55 pm |
|
|
Do you have the CCS C compiler ? This forum is about that C compiler.
It's not a general electronics forum. The CCS compiler has support for
i2c, but we can't help you much if you don't have the compiler.
To learn about i2c, use Google to search for this:
|
|
|
NAVID
Joined: 14 Jun 2017 Posts: 28
|
|
Posted: Fri Jul 28, 2017 2:08 am |
|
|
PCM programmer wrote: | Do you have the CCS C compiler ? This forum is about that C compiler.
It's not a general electronics forum. The CCS compiler has support for
i2c, but we can't help you much if you don't have the compiler.
To learn about i2c, use Google to search for this:
|
yes i have ccs (:
but i think the forum is about ccs!! //: |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19513
|
|
Posted: Fri Jul 28, 2017 2:59 am |
|
|
The point is we suffer from a lot of people who ask general questions and don't actually use the CCS compiler... :(
Now have a look at:
<http://i2c.info/i2c-bus-specification>
<www.nxp.com/documents/.../design_con_2003_tecforum_i2c_bus_overview.pdf>
<www.ti.com/lit/an/slva704/slva704.pdf>
The examples with the compiler, here, and in the code library also go into this.
There are three basic 'parts':
The hardware of the bus itself.
The 'protocol' using this bus.
The PIC's own hardware.
There is the main I2C overview document:
<http://www.i2c-bus.org/specification/>
The site pointing to this, also has a huge amount to help.
The main document does cover everything, except the PIC specific stuff, but it is a bit of a slog... :( |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9226 Location: Greensville,Ontario
|
|
Posted: Fri Jul 28, 2017 5:02 am |
|
|
After you get you PIC 'up and running a 1Hz LED program be sure to download PCM P's 'I2C Scanner proram from the code library.
It's a 'must have - must use' program ! It WILL tell you if you have any I2C perhipherals on the bus AND display their base addresses.
It CONFIRMS you've got PIC, I2C and basic programming skills correct.
Jay |
|
|
|