PDA

View Full Version : Make your own I2C Chip



NL2TTL
- 10th August 2005, 19:45
Does somebody kno whow to make your own I2C chip.

I want to program serval of 16F628 PIC that when i send I2C information from a master the 16F628 works as slaves.

is there a sample code or something?

Bruce
- 10th August 2005, 21:09
Microchip has several examples for master & slave with very well documented code http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1490&filterID=392

NavMicroSystems
- 10th August 2005, 23:42
All I can tell here (to save you some time) is:

Take care when reading (and implementing) the AN's

There are still some bugs!

Gevo
- 11th August 2005, 11:30
Hi NL2TTL,

I make the Slave-Display for the http//www.alphavibe.com

The PIC is a F628A, communication is serial (you have change to I2C)
and the PIC multiplex two 7-seg blue LED's for display the time. So there is much time for other task. Just a I/O expander...

If a copy of this PBP code helps, let me know.

Best regards,
Gerben

Acetronics2
- 11th August 2005, 12:13
Hi, N2TTL

Something here in PicBasic !!!

it was intended for a 12C671 ... no problem then !!!

Gp5 is serial input
Gp4 is output to an opto-triac
Gp3 is reset
Gp2-Gp0 are addresses ( Swiches active = LOW )

The RS 232 to I2C move will be quite simple ...with PBP !!!

Alain

Melanie
- 11th August 2005, 12:35
I've mentioned before on other threads the reasons why I can't contribute to this topic, I can however give two handy hints...

1. Microchip's MCP23008-E/P and MCP23016-E/P. As I/O expanders, they're easy to use, very simple PBP code use I2CREAD and I2CWRITE, versatile - and cheap!

2. Look at this site (greetings Robert) for PBP Code...

http://astrosurf.com/soubie/pic_as_an_i2c_slave.htm

Melanie

Acetronics2
- 11th August 2005, 12:56
2. Look at this site (greetings Robert) for PBP Code...

**** just edited that out **** Melanie!

Melanie

Hi, Mel

May be something forgotten in the link ???

Alain

Melanie
- 11th August 2005, 13:55
Ooops! Thank Gawd my server is firewalled! Just posted the link to my own I2C Slave Notes in error! anyhow... been corrected... thanks Alain!

NL2TTL
- 11th August 2005, 17:29
Thanx to all, i will try something with this code examples.

You will hear from me!