Jump to content
ELFORUM - Forumul Electronistilor
Sign in to follow this  
kit

ajutor pic12f629

Recommended Posts

am codul:__CONFIG _CP_OFF & _CPD_OFF & _BODEN_OFF & _MCLRE_ON & _WDT_OFF & _PWRTE_ON & _INTRC_OSC_NOCLKOUTmain call 0x3FF ; retrieve factory calibration value bsf STATUS,RP0 ; set file register bank to 1 movwf OSCCAL ; update register with factory cal value bcf STATUS,RP0 ; set file register bank to 0; remaining code goes here banksel TRISIO movlw 0x02 movwf TRISIO movlw 0x00 movwf WPU bsf OPTION_REG,NOT_GPPU banksel GPIOloop: btfss GPIO,GP1 bsf GPIO,GP0 call delayx bcf GPIO,GP0 call delayx goto loop delayx: movlw 0xa0 ;0x07 movwf tempxdelayx_loop: decfsz tempx,F goto delayx_loop return... care ar trebui sa-mi flicaie pe GP0 un led atunci cand pe GP1 am 0, iar cand am 1 sa-l lase stins. In simulator o face, dar in realitate ba... Nu ma taie nici in ruptul capului de ce naiba, ma poate ajuta cineva?

Share this post


Link to post
Share on other sites

delayx este o intirziere de max 1mS, deci nu ai cum sa vezi ca "flicaie" ledul.

Share this post


Link to post
Share on other sites

am uitat sa specific: semnalul de pe GP0 il vizualizez pe osciloscop. datele prezentate in problema sunt certe. le-am trait pe pielea mea. imi scapa ceva, dar nu vad ce: am citit documentatia si pe muchie, dar nu vad unde-i scaparea.

Share this post


Link to post
Share on other sites

uf! am gasit! lipsea:MOVLW 0X07MOVWF CMCONscria treaba asta si intr-o nota, dar...

Share this post


Link to post
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.

Sign in to follow this  

×
×
  • 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.