Help: RC13 & RC14 input and Timer 1&2 Noise?

General discussion on mikroC PRO for dsPIC30/33 and PIC24.
Post Reply
Author
Message
chapmjw
Posts: 33
Joined: 04 Oct 2004 19:46
Location: Alabama, US

Help: RC13 & RC14 input and Timer 1&2 Noise?

#1 Post by chapmjw » 24 Feb 2010 20:25

Hi,

I've got a problem with reading input on Pins Rc13 & Rc14. I think the problem is coming from Timer 1 and 2 which is on those pins also. I don't know how to work around it and would greatly appreciate any advice. What you see is input from 4 sources, Rc13 and Rc14 (Red and Blue) show noise with some sort sinusoidal pattern. The o-scope doesn't show this noise on the pins itself, so I know it software or config related.

thanks
jim

chip dspic 3010 10mhz ppl8
config:
ADPCFG = 0x0000;
UART1_Init(9600);

TRISB = 0;
TRISC = 0xFFFF; // < many variations have been tried
TRISE = 0x0100;
TRISD = 0xff;
Attachments
Graph.GIF
Graph.GIF (16.91 KiB) Viewed 2226 times

OT
Posts: 581
Joined: 19 May 2005 05:08
Location: Fairbanks, Alaska

Re: Help: RC13 & RC14 input and Timer 1&2 Noise?

#2 Post by OT » 25 Feb 2010 05:12

What if you move the RS232 communication to UART2?

At some point (dsPIC pascal 6.0) I seemed to have problems with UART1 bleeding over to the Alt-UART pins RC13 and RC14 (without Alt-UART activated), which made me move to UART2 for that project. I have not had time to recheck with the Pro compiler.

chapmjw
Posts: 33
Joined: 04 Oct 2004 19:46
Location: Alabama, US

Re: Help: RC13 & RC14 input and Timer 1&2 Noise?

#3 Post by chapmjw » 25 Feb 2010 05:28

Thanks for the reply, I can't move it over because it's part of a already completed board but I will try it without using the UART. I know what the input should be and I'll test to see if it's out of range.
thanks again.
jim

OT
Posts: 581
Joined: 19 May 2005 05:08
Location: Fairbanks, Alaska

Re: Help: RC13 & RC14 input and Timer 1&2 Noise?

#4 Post by OT » 25 Feb 2010 05:53

Now, that the memory seems to surface a bit more, and looking at the code from that time it seems more likely that my problem was the other way around. I think I had Alt-UART on RC13/14 and had problems with the SPI communication (input), because of it. So that idea might be very long shot.

Post Reply

Return to “mikroC PRO for dsPIC30/33 and PIC24 General”