Re: PIC18f4331 PWM Problem




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

.



Relevant Pages

  • Re: pull-up/pull-down/short-protection resistor design
    ... >> is the benefit to connect the pins with a resistor without ... > and basically create a short from Vcc to ground. ... > the circuit, or the power dissipation, any good. ...
    (comp.arch.embedded)
  • Re: Pull up resistors on Spartan 3 mode pins
    ... Trivial aspects of the design are not properly documented - that's been admitted - but the corrections have not been brought to our attention. ... And the Spartan3 devices have an explicitly low pullup impedance that should be virtually immune to any crosstalk that's applied to an unconnected pin. ... I'd expect the antenna of connecting a 10 kohm resistor to the internal 3 kohm pullup would introduce more noise than leaving the pin unconnected. ... Will the mode pins which appear to always have external pullups independent of the HWSWAP_EN pin behave fine when no external resistors are connected? ...
    (comp.arch.fpga)
  • Re: Replacing Tektronix 465 range bulb
    ... it with LED and a resistor if I can get to it. ... I definitely would consider LEDs and resistor ... pins become intermittent at the ceramic substrate solder junction. ... Amazing that you could solder them at all,the plating/tinning on those ...
    (sci.electronics.repair)
  • Re: Battery bias directly to grid
    ... There are four grid pins (thanks, Chris, that is indeed what ... > resistors in parallel to four pins than one resistor (somehow attached ... Anything which can oscillate, does oscillate, unless something to stop it ...
    (rec.audio.tubes)
  • Re: Replacing Tektronix 465 range bulb
    ... and a resistor if I can get to it. ... I definitely would consider LEDs and resistor in ... At first I thought that it was the socket but it turned out that the pins ... water soluble flux because rosin flux just would not work wit those pins. ...
    (sci.electronics.repair)