View previous topic :: View next topic |
Author |
Message |
PROMOD
Joined: 01 Feb 2018 Posts: 42
|
1st & 2nd Module of SDA & SCL |
Posted: Tue Dec 25, 2018 9:49 am |
|
|
PIC18F4431
In the 40 pin PIC18F4431 device there are two SCL & SDA modules. One is in PORTC and another one is in PORTD.
Which one should I consider as 1st module and which one 2nd module?
Last edited by PROMOD on Tue Dec 25, 2018 10:26 am; edited 1 time in total |
|
|
dluu13
Joined: 28 Sep 2018 Posts: 395 Location: Toronto, ON
|
|
Posted: Tue Dec 25, 2018 10:08 am |
|
|
Seems there's only one module. The ones on port c are the alternate pin. Check register 22-5 on the datasheet which explains how to select the multiplexer to use to set the pair of pins you want for the i2c.
It should be a fuse setting. |
|
|
elcrcp
Joined: 11 Mar 2016 Posts: 62 Location: izmir / Turkey
|
|
Posted: Tue Dec 25, 2018 11:45 am |
|
|
Please check datasheet page 5 note 1
"RC3 is the alternate pin for T0CKI/T5CKI; RC4 is the alternate pin for SDI/SDA; RC5 is the alternate pin for SCK/SCL." _________________ There is nothing you can't do if you try |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9246 Location: Greensville,Ontario
|
|
Posted: Wed Dec 26, 2018 6:12 am |
|
|
If you actually need a PIC with 2 HW I2C, I suggest the PIC18F46K22. It also has 2 HW UARTS, LOTS of memory, internal peripherals and will run on 3 OR 5 volts. I've designed many products with it ove rthe past 5-6 years and it's been very stable...my 'GOTO' PIC.
Jay |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19552
|
|
Posted: Wed Dec 26, 2018 7:03 am |
|
|
This is a good example of where actually reading what the data sheet says fully is important.
Two sets of pins for I2C, but only one actual module.
Similar things with devices like the PWM, where the number of pins is often
very much larger than the number of physical channels....
For a master I2C, in most cases the software I2C implementation is entirely adequate.
Where there are two physical peripherals, the data sheet will list the
connections with numbers. So SDA1, & SDA2 for example, which identifies
which peripheral is which. |
|
|
|