Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[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
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:
Snap1.jpg

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.
 

Connecting PIN1 to Vdd doesn't cause the controller to damage, check the output of your Regulator if it supply 5v or more than.
 

Hello.

Thanks for your answers.

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

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 ?
 

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

Yes. that could be the problem?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top