Author |
Message |
Topic: 18F2520 Timer Setup Problem |
R0B0T1CS
Replies: 15
Views: 15079
|
Forum: General CCS C Discussion Posted: Mon Jul 06, 2009 9:48 am Subject: 18F2520 Timer Setup Problem |
Hey, I got it working ... half of the time :\
Here's how to make the 18F2520 function properly at 40Mhz.
1-In the ICD interface window I used the "Advanced" tab to manually set the uC ... |
Topic: 18F2520 Timer Setup Problem |
R0B0T1CS
Replies: 15
Views: 15079
|
Forum: General CCS C Discussion Posted: Mon Jul 06, 2009 7:33 am Subject: 18F2520 Timer Setup Problem |
If the 18F2520 is programmed and powered, whether it is being dissabled by the ICD or not, it runs the same and produces a wave form which is ~140us square wave with 59% duty cycle.
PCWH 3.209
#in ... |
Topic: 18F2520 Timer Setup Problem |
R0B0T1CS
Replies: 15
Views: 15079
|
Forum: General CCS C Discussion Posted: Sun Jul 05, 2009 11:21 pm Subject: 18F2520 Timer Setup Problem |
wait, wait... now I see.
The second osc statement you highlighted, which I somehow missed seeing before, is extra code I missed commenting out of what I posted here.
//NOWDT,NOMCLR,INTRC_IO,NOPBADEN ... |
Topic: 18F2520 Timer Setup Problem |
R0B0T1CS
Replies: 15
Views: 15079
|
Forum: General CCS C Discussion Posted: Sun Jul 05, 2009 10:24 pm Subject: 18F2520 Timer Setup Problem |
no change.
I haven't even told the program to "run" and the output is being provided. hitting "run" in the icd control gui changes nothing.
Also, if 2 osc setup statements is & ... |
Topic: 18F2520 Timer Setup Problem |
R0B0T1CS
Replies: 15
Views: 15079
|
Forum: General CCS C Discussion Posted: Sun Jul 05, 2009 7:38 pm Subject: 18F2520 Timer Setup Problem |
pcwh 3.209
The PIC functions the same even when no OSC is connected.
#include "18F2520.h"
#device icd=true
#device *=16 ADC=8
#fuses HS,NOPROTECT,NOLVP,NOWDT,PUT,NOBROWNOUT
//////NOW ... |
Topic: 18F2520 Timer Setup Problem |
R0B0T1CS
Replies: 15
Views: 15079
|
Forum: General CCS C Discussion Posted: Sun Jul 05, 2009 5:17 pm Subject: 18F2520 Timer Setup Problem |
Actually, if I have NO Osc or TX connected, it still has the same timing. Something Internal is triggering the uC. How do I turn it off?
I'm using a scope on a real circuit. |
Topic: 18F2520 Timer Setup Problem |
R0B0T1CS
Replies: 15
Views: 15079
|
Forum: General CCS C Discussion Posted: Sun Jul 05, 2009 3:55 pm Subject: 18F2520 Timer Setup Problem |
Using a 20MHz crystal, instead of the 40MHZ Oscillator, doesn't improve anything. Produces signal is now 7us instead of 80us.
Actually, if I have NO Osc or TX connected, it still has the same timin ... |
Topic: 18F2520 Timer Setup Problem |
R0B0T1CS
Replies: 15
Views: 15079
|
Forum: General CCS C Discussion Posted: Sun Jul 05, 2009 2:42 pm Subject: 18F2520 Timer Setup Problem |
I usually use the 18F452, but today it's the 18F2520.
Even with the oscillator disconnected, the output pin provides a 59% duty cycle 136us period square wave. If the pin address is changed the outpu ... |
|