Re: PIC18f4331 PWM Problem
- From: "Anthony Fremont" <anyone@xxxxxxxxxx>
- Date: Thu, 5 Jul 2007 06:34:54 -0500
ydoubleuz@xxxxxxxxx wrote:
Hi Guys.
Wrote a simple program to generate some PWMs. Using MPLAB, the output
are just as expected. However, after writing to a 18f4331 and
observing the output from an oscillator, some pins do not produce the
PWM at all.
<snip for clarity>
2. Circuitry:
I tied MCLR and all other unused pins to gnd. OSC1 & OSC2 to a 4MHz
crystal.
On most PIC chips, MCLR needs to be pulled high or you are holding the
device in RESET. I work with 16F PICs primarily, but I think this still
applies.
You only need to tie unused _inputs_ high or low, unused outputs can be left
floating.
Observations:
a) Nothing will be observed if PWM4(pin38) is not shorted to ground
for a brief duration. WHY???
b) Some pins (PWM1,PWM2) do not have any output. WHY??? MPLAB shows it
should have.
If some pins have the correct output, but others don't then the problem is
usually that you have left some pins in their default analog mode
(comparators or ADC inputs).
c) When I burn the prog. into a new chip, (a) is again observed but
now other PWMs do not have outputs instead. WHY WHY??
Output pins can be killed by overloading them (such as by trying to drive a
pin connected to ground high), but I believe the 18F PICs have more series
resistance in the output driver to help prevent death.
.
- Follow-Ups:
- Re: PIC18f4331 PWM Problem
- From: ydoubleuz@xxxxxxxxx
- Re: PIC18f4331 PWM Problem
- References:
- PIC18f4331 PWM Problem
- From: ydoubleuz@xxxxxxxxx
- PIC18f4331 PWM Problem
- Prev by Date: Re: Max input level of a PC soundcard?
- Next by Date: Re: DRAM data persistence
- Previous by thread: PIC18f4331 PWM Problem
- Next by thread: Re: PIC18f4331 PWM Problem
- Index(es):