I have poored over everything I can find pertaining to I2C. I have not found (or maybe overlooked) any information on using 2 Pins from a 16C5X series to communicate with a Serial EEPROM.
More to the point. I am using a PIC16C57 and 24LC16B EEPROM for storage. Does anyone know of a routine to use - say - PORTB.6 and PORTB.7 as the SCL and SCD pins?
Thanks for any help.
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
Posted: Mon Jul 31, 2006 2:30 pm
Quote:
Does anyone know of a routine to use - say - PORTB.6 and PORTB.7 as the SCL and SCD pins?
CCS has examples for this. Look at the EX_EXTEE.c example file
and the 2416.c driver file. In the example file, you'll have to change
the PIC from a 16C56 to a 16C57.
Also, to change the default pins used by the 2416.c file, you need to
add the following lines shown in bold below:
The example file is in this folder: c:\Program Files\Picc\Examples
The driver file is here: c:\Program Files\Picc\Drivers
Ttelmah Guest
Posted: Tue Aug 01, 2006 4:01 am
As one further comment, if the supplied drivers are not working. The commonest 'mistake' with I2C, is forgetting the pull-up resistors needed on each wire. This happens about once a month here on average. The internal port_b pull-ups, are not enough for I2C to work properly.
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