[PIC] What I did wrong? 18F452 damaged.

Status
Not open for further replies.

ppperez

Newbie level 5
Joined
Jul 31, 2014
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
84
Hello Masters.

I am new but I am studding to learn more about PICs, I needed to start with the practice.

This is my blinking code:

Code:
#include <p18f452.h>
#include "stdio.h"
#include <delays.h>
#pragma config OSC = HS  //Defining an external crystal
#pragma config WDT = OFF        //Disabling watch dog
#define LEDPin LATDbits.LATD1   //Label defining the pin D1 as output
#define LEDTris TRISDbits.TRISD1  //Label defining the pin D1 as input or output direction

void main()
{
    LEDTris = 0;         //Defining as output direction
    LEDPin = 1;          //Enbling D1 Port as output.
    while(1)
      {
        LEDPin = ~LEDPin;
        Delay10KTCYx(75);
      }
}

This is the circuit that I did:


I think that the problem is that I connect the PIN1 to 5V directly, after connect it directly, the PIC was damaged.

I am using C18.

Could someone tell me what I did wrong?
 

I think that the problem is that I connect the PIN1 to 5V directly, after connect it directly, the PIC was damaged.
hi,
If you connect an Output directly to +5V, as soon as the pin switches Low [0v] the internal sinking transistor will be destroyed by trying to sink the unlimited current.
E
 
I doubt very much that the PIC has been damaged. PIC's are very tough devices and the only practical way that you can damage them is to put a high voltage high current supply on the pins. Shorting the outputs does not damage them I know because I have done it many many times without any bad effects.
 

Hello.

Thanks for your answers.

Let me share the following 2 screen shots, I think that the PIC is damaged.


I am using PICKit2, when I select the Verify button I get the warning, when I want to write it, I get the same error or warning.

Can I fix it? or do I need to buy another one?

Thanks again for your comments. I will buy another 7805 and I will check the voltage.

Code:
Did you practise safe EOS /ESD?
I am not heard about it, but I will study them. Thanks
 

I see you're using Pickit2 , by any chance have you forgot the MCLR pin connected to VDD ?
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…