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 support@ccsinfo.com

SC16IS752 problem

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



Joined: 28 Feb 2006
Posts: 151

View user's profile Send private message

SC16IS752 problem
PostPosted: Mon Mar 09, 2015 2:51 pm     Reply with quote

Hi! I'm currently testing a board that has a SC16IS752 connected to a PIC24EP512GU810.

The thing is that I'm trying to use the library for the SC16IS752 posted on this forum but i cant make it work.

I tested the I2C connection to the IC successfully, but i cant make the SC16IS752 output a byte on the TXA or TXB pin.

I use the CCS compiler version 5.042, and here is the portion of the code that uses the i2c port:

Code:
#use I2C(master, sda=PIN_D4, scl=PIN_D5, stream = uart_i2c, SLOW)


Then i init the IC.

Code:
Init_SC16IS752();


then i try to output the "X" char over both ports

Code:
 while(1)
   {   
   delay_ms(200);
   UART_Send_Char(0,'X');
   UART_Send_Char(1,'X');
   output_toggle(PIN_F13);
   fprintf(U2,"TEST...\n\r");
   }


Someone have a suggestion?

thanks!
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Mar 09, 2015 3:15 pm     Reply with quote

Run this program and see if it detects the i2c chip:
http://www.ccsinfo.com/forum/viewtopic.php?t=49713
championx



Joined: 28 Feb 2006
Posts: 151

View user's profile Send private message

PostPosted: Mon Mar 09, 2015 4:26 pm     Reply with quote

Hi PCM thanks for your answer! yes, that is the first thing that i did, it detects the chip with the address 9A which is correct when both A0 and A1 are tied to ground.

Im really stuck here...
dyeatman



Joined: 06 Sep 2003
Posts: 1925
Location: Norman, OK

View user's profile Send private message

PostPosted: Mon Mar 09, 2015 5:27 pm     Reply with quote

What frequency xtal are you running on the SC16?
_________________
Google and Forum Search are some of your best tools!!!!
championx



Joined: 28 Feb 2006
Posts: 151

View user's profile Send private message

PostPosted: Tue Mar 10, 2015 6:10 am     Reply with quote

Hi dyeatman! im running it a 11.052mhz.

Something weird... if i measure the xtal with an scope i dont see the 11mhz
temtronic



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

View user's profile Send private message

PostPosted: Tue Mar 10, 2015 7:40 am     Reply with quote

What value xtal caps have you used ???

Jay
championx



Joined: 28 Feb 2006
Posts: 151

View user's profile Send private message

PostPosted: Tue Mar 10, 2015 7:52 am     Reply with quote

I use 33pf and 22pf. Is that too much?
championx



Joined: 28 Feb 2006
Posts: 151

View user's profile Send private message

PostPosted: Tue Mar 10, 2015 8:23 am     Reply with quote

IT WORKS!

Thanks for the help... it turns out that the company that assemblies the boards made a mistake on the XTAL capacitors, so i replace both for 22pf and worked at the first attempt....

2 days of my life lost cause of two caps... Mad

thanks for the help.
temtronic



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

View user's profile Send private message

PostPosted: Tue Mar 10, 2015 8:47 am     Reply with quote

Good to here you're 'up and running' !

33 puff too much for an 11MHz xtal, 15-22 puff would be my gut feeling.

I know how easy it is to 'misplace' parts in the wrong bin. Only two days is not bad. I lost 3 weeks to an unsoldered wiper on a trim pot. It 'made' connection due to a fairly tight fit but when the board got cold, it nicely 'disconnected', perfectly centered in the hole.sigh....the good old dayze !

Jay
championx



Joined: 28 Feb 2006
Posts: 151

View user's profile Send private message

PostPosted: Tue Mar 10, 2015 9:54 am     Reply with quote

haha! Yes temtronic! and when the caps are SMD 0805 it is very hard to know if the value is ok.

well... thanks a lot for your help!
Ttelmah



Joined: 11 Mar 2010
Posts: 19401

View user's profile Send private message

PostPosted: Tue Mar 10, 2015 10:03 am     Reply with quote

The classic one if the 'decimal slip'. 22nF, for 22pF etc..
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