Re: PIC18f4331 PWM Problem
- From: "ydoubleuz@xxxxxxxxx" <ydoubleuz@xxxxxxxxx>
- Date: Thu, 05 Jul 2007 18:59:03 -0700
Hi Anthony, tks for responding
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.
Yup that was a typo error on my part. I tied the MCLR to high through
a resistor.
You only need to tie unused _inputs_ high or low, unused outputs can be left
floating.
Will this affect the output if i tied all unused outputs? I will try
that out later.
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).
PWM 0-3 are latched with PortB only.PWM4-5 are latched to another
register "KBI1 and KBI0".
I had initialized TRISB to 0x00. Is this correct?
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.
These pins are only connected to the oscilloscope and nothing else.
Btw, any idea why must PWM5(KBI1/RB5/PGM) be shorted to ground before
anything starts? I had an output at RA1 which drives a LED at the very
start of the program. If i leave PWM5 unconnected or connected to a
oscilloscope, the LED will not lit up and no output will be observed
on any pins. It is after shorting that pin to ground that i start
getting SOME outputs and LED will be lit.
Tks again. I am losing some sleep and lotsa hair over this issue. :)
ywz
.
- Follow-Ups:
- Re: PIC18f4331 PWM Problem
- From: Steve Sousa
- Re: PIC18f4331 PWM Problem
- References:
- PIC18f4331 PWM Problem
- From: ydoubleuz@xxxxxxxxx
- Re: PIC18f4331 PWM Problem
- From: Anthony Fremont
- PIC18f4331 PWM Problem
- Prev by Date: Re: DRAM data persistence
- Next by Date: Re: Thinking about going back to doing eng
- Previous by thread: Re: PIC18f4331 PWM Problem
- Next by thread: Re: PIC18f4331 PWM Problem
- Index(es):
Relevant Pages
|