|
|
View previous topic :: View next topic |
Author |
Message |
arunb
Joined: 08 Sep 2003 Posts: 492 Location: India
|
Replicate I2C in PIC 16F628 mcu |
Posted: Mon Jul 28, 2003 9:48 pm |
|
|
Hi All,
Is it possible to use the #uses_I2C routine in an mcu (like the PIC 16F628 ) which does not have an built-in I2C ports ???.
thanks
arun
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516456 |
|
|
john cutler
Joined: 06 Sep 2003 Posts: 82 Location: Hot Tub, California
|
Re: Replicate I2C in PIC 16F628 mcu |
Posted: Mon Jul 28, 2003 9:54 pm |
|
|
YES!! I'm doing that with an 18F1320, using the UART for RS232.
You just need to set it up just like if you did have hardware I2C. Specify the xmit and receive pin, master mode, speed.
Check out page 57 of the CCS Manual (which you can download)
Good luck
JC
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516457 |
|
|
R.J.Hamlett Guest
|
Re: Replicate I2C in PIC 16F628 mcu |
Posted: Tue Jul 29, 2003 1:57 am |
|
|
:=Hi All,
:=
:=Is it possible to use the #uses_I2C routine in an mcu (like the PIC 16F628 ) which does not have an built-in I2C ports ???.
:=
:=thanks
:=arun
Yes, but with some 'limits'.
Only the master mode is supported (doing a slave, and getting the response fast enough, would be very hard).
Quite a few people do this, even on chips with hardware (for instance, I am using the MSSP, to drive an SPI bus, so to read an I2C clock chip, take advantage of the 'software' version on another pair of pins).
Fortunately, because the 'master' controls the bus timing, unlike the software serial routines, the I2C implementation keeps working OK, even if interrupts occur during the transactions.
Best Wishes
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516459 |
|
|
|
|
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
|