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?
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?
Microchip has several examples for master & slave with very well documented code http://www.microchip.com/stellent/id...0&filterID=392
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!
regards
Ralph
_______________________________________________
There are only 10 types of people:
Those who understand binary, and those who don't ...
_______________________________________________
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
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
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
Bookmarks