Re: Has my PIC blown?




"Silverfox" <silverfox.williams@xxxxxxxxx> wrote in message
news:1132317127.392138.298620@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hello there all,
>
> I am sort of new to the electronic world and wondered if any of you
> could help.
>
> I have a PIC16F84 and written a simple program to just turn on PIN RA0
> which is attached to an LED.
>
> Pin 4 (MCLR) is connected to a capacitor wich then goes to ground.

This will never work, you are holding the chip in reset. MCLR should go
to +5V. Have you read the data***?

> Pin 5 is to ground.
> Pin 14 is to 5V.

These are ok.

> Pin 17 and 18 are to an Oscillator of 4MHz.

What kind of oscillator? Is it a 4Mhz crystal?

> Pin 19 is to and LED to ground.

There is no pin 19, it's only an 18 pin part. You must mean pin 17.

> My configuration bits are:
> Oscillator : XT

Ok if you are using a crystal. If you are using a crystal, then you
also need to 33pF caps connected to ground.

> Watchdog Timer : On
> Power up timer : Off

PWRTE should be ON.

> Code Protect : Off
>
> Please excuse me if any of my terminology is incorrect as I am still
> learning.
> I have tested the code in simulation mode and the STATUS, TRISA and
> PORTA registers seem to be set correctly.

Set the TRISA register 0x00 to make all the pins output. You should
also set TRISB to 0x00 to make all those pins output as well. That way
you don't have to tie the unused pins to Vcc or gnd. Never let input
pins float.

> The LED doesn't come on? Should I post my code?

Yes, post ALL of your code. If you can successfully reprogram and
verify the chip, then it's probably fine.

> Could somebody point me in the right direction?

Fix the MCLR pin and the other things I mentioned. Tell us how you are
powering the PIC chip.

.