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

IDE error messages

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



Joined: 12 Jul 2004
Posts: 192
Location: Hemet, California USA

View user's profile Send private message

IDE error messages
PostPosted: Fri Jul 16, 2021 2:57 pm     Reply with quote

Are you having trouble with I2C pin settings?
Pay attention to the error messages!
That's all I have to say. javascript:emoticon('Embarassed')
_________________
David
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Jul 16, 2021 5:01 pm     Reply with quote

Why don't you tell us what they are, so people who don't have the
IDE can learn something ?
PrinceNai



Joined: 31 Oct 2016
Posts: 480
Location: Montenegro

View user's profile Send private message

PostPosted: Fri Jul 16, 2021 9:45 pm     Reply with quote

https://www.youtube.com/watch?v=Otm4RusESNU

https://www.youtube.com/watch?v=7-Yr1nQ3dFI
dluu13



Joined: 28 Sep 2018
Posts: 395
Location: Toronto, ON

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

PostPosted: Mon Jul 19, 2021 7:21 am     Reply with quote

Taking a wild guess here: You need to use #pin_select
temtronic



Joined: 01 Jul 2010
Posts: 9232
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Mon Jul 19, 2021 10:35 am     Reply with quote

I've never, ever had problems with I2C pin settings in 25 years, though maybe the OP is using a PIC other than the ones I've used ??
Ttelmah



Joined: 11 Mar 2010
Posts: 19529

View user's profile Send private message

PostPosted: Mon Jul 19, 2021 10:53 am     Reply with quote

As diuu13 says, pin_select is an obvious one. Also the slew rate control can
rear it's head on some chips.
In all cases it is a critical to 'read the data sheet' situation....
drh



Joined: 12 Jul 2004
Posts: 192
Location: Hemet, California USA

View user's profile Send private message

PostPosted: Fri Jul 23, 2021 7:03 am     Reply with quote

It wasn't the pin select. I had not set up the clock source for the I2C module and left the TRIS for the two I2C pin as inputs. They need to be outputs. I ASSUMED that a module as complicated as this I2C would take control. I probably should have mentioned the chip: PIC18F47Q43. And this is the first time I have used the CCS IDE and ICD-80 although I've used the compler with MPLAB and MPLABX for years.

I was misled by the symbolic listing which showed confusing information.
The clock source problem was pointed out by Richard at CCS. And he also discovered the Symbolic listing did not match the CCS Basic listing. And did some testing of his own to verity the generated code.
Excellent customer support from Richard at CCS.
_________________
David
Ttelmah



Joined: 11 Mar 2010
Posts: 19529

View user's profile Send private message

PostPosted: Fri Jul 23, 2021 7:42 am     Reply with quote

This is very much a data sheet one.
The compiler will setup things for a fixed location peripheral, but when
the peripheral can be moved using PPS, there are so many things that need
to also change, that you have to do it.
Critical not in the data sheet:
Quote:

Important: The pin locations for SDA and SCL are remappable through the
Peripheral Pin Select (PPS) registers. If new pin locations for SDA and SCL
are desired, user software must configure the INLVLx,SLRCONx, ODCONx,
and TRISx registers for each new pin location. The RxyI2C registers cannot
be used since they are dedicated to the default pin locations. Additionally,
the internal pull-ups for non-I2C pins are not strong enough to drive the
pins; therefore, external pull-up resistors must be used.

You are also using here the dedicated I2C module, not the more normal
MSSP module. This has a lot of extra settings that need to be made. Sad
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