CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

1st & 2nd Module of SDA & SCL

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
PROMOD



Joined: 01 Feb 2018
Posts: 42

View user's profile Send private message

1st & 2nd Module of SDA & SCL
PostPosted: Tue Dec 25, 2018 9:49 am     Reply with quote

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

View user's profile Send private message Visit poster's website

PostPosted: Tue Dec 25, 2018 10:08 am     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Dec 25, 2018 11:45 am     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Dec 26, 2018 6:12 am     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Dec 26, 2018 7:03 am     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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