PIC question

Nov 05, 2008 7 Replies

I am tired of writing bit-banger I2C pseudo-masters, so I looked for PICs with I2C masters built-in. There seem to be very few. Do they have to pay a license fee to someone to include a I2C master? Or does it use a lot of silicon real estate? Or is it generally that PICs are used in slave devices?


The PIC24Fs have I2C masters.

Be careful, many of the 24F silicon have a nasty I2C power-on bug:

formatting link

Dave.

Dump the PIC and use an ARM based controller and you'll be in a whole new wonderfull world very soon.

Programmeren in Almere? E-mail naar nico@nctdevpuntnl (punt=.)

Also the Atmel AtmegaXXX series have I2C compatible interfaces, but they call it TWI (two wire interface).

Paul

Never heard of a LIBRARY include?

Write Once, Use many!

formatting link
"

Bah, I'm lazy. I make maybe one project a year, by which time I've completely forgotten everything and the time it takes to re-learn using libraries and stuff is the same as re-writing my code... My code is all ad hoc baby, I don't understand it two days later!

I've never written an I2C "master", but code that does just enough to act like one for long enough...

So, being lazy, I figure my best approach is to use a chip that has everything I want in hardware, so at least the code is more obvious when I'm writing to registers. And I know it's a real I2C master, no a kludge I wrote a year ago.

The 18F series has I2C. Does not show up in the parameter search because it's handled by the MSSP. I have used the MSSP in SPI mode on a 18F2550, but have not needed I2C yet.

Joe Chisolm Marble Falls, TX

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required