Jump to content
ELFORUM - Forumul electronistilor
Guest andrei1991

poblma pic18f4520

Recommended Posts

Guest andrei1991

de cateva ore incerc sa dau de capat unei probleme,dar fara rezultate. am facut un montaj cu un pic18f4520, pentru aprinderea unui led la un anumit interval de timp, am legat pinul 1(MCLR) la + printr-un rezistor de 4.7k, pinul 11 (VDD) la + ,si 12 (VSS) la -. Problema este ca ledul licaie doar atunc cand pun degetul pe orice rezistenta sau fir din circuit, atunci cand cand iau degetul nu mai licaie. Tensiunile pe vdd si mclr sunt aceleasi in ambele cazuri, intre 4,98-5.01. Orice parere este binevenita.

Link to comment
Share on other sites

Guest andrei1991

am folosit oscilatorul intern, pt ca nu am condensatorii potriviti in momentu asta, proabil maine o sa cumpar.

 

#include<htc.h>#include<pic18.h>#define _XTAL_FREQ 8000000__CONFIG(1, INTCLKO);__CONFIG(2, WDTDIS);__CONFIG(3, MCLRDIS);__CONFIG(4, UNPROTECT);void main(){    TRISD=0x00;    PORTD=1;      while(1)    {        RD2=1;        __delay_ms(50); __delay_ms(50); __delay_ms(50);        RD2=0;        __delay_ms(50); __delay_ms(50); __delay_ms(50);    }}
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.Terms of Use si Guidelines