View previous topic :: View next topic |
Author |
Message |
championx
Joined: 28 Feb 2006 Posts: 151
|
SC16IS752 problem |
Posted: Mon Mar 09, 2015 2:51 pm |
|
|
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.
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
|
|
|
championx
Joined: 28 Feb 2006 Posts: 151
|
|
Posted: Mon Mar 09, 2015 4:26 pm |
|
|
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: 1934 Location: Norman, OK
|
|
Posted: Mon Mar 09, 2015 5:27 pm |
|
|
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
|
|
Posted: Tue Mar 10, 2015 6:10 am |
|
|
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: 9245 Location: Greensville,Ontario
|
|
Posted: Tue Mar 10, 2015 7:40 am |
|
|
What value xtal caps have you used ???
Jay |
|
|
championx
Joined: 28 Feb 2006 Posts: 151
|
|
Posted: Tue Mar 10, 2015 7:52 am |
|
|
I use 33pf and 22pf. Is that too much? |
|
|
championx
Joined: 28 Feb 2006 Posts: 151
|
|
Posted: Tue Mar 10, 2015 8:23 am |
|
|
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...
thanks for the help. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9245 Location: Greensville,Ontario
|
|
Posted: Tue Mar 10, 2015 8:47 am |
|
|
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
|
|
Posted: Tue Mar 10, 2015 9:54 am |
|
|
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: 19550
|
|
Posted: Tue Mar 10, 2015 10:03 am |
|
|
The classic one if the 'decimal slip'. 22nF, for 22pF etc.. |
|
|
|