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] LED blinking for 1 second on 16F84A NOT WORKING

Status
Not open for further replies.

dannyelloko20

Newbie level 5
Joined
Mar 25, 2015
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
65
HI everyone, Im trying to make my LED's blink but i dont know what the problem is with my code. This is what I have:

Code:
		#include <GENERAL.H> (my library)
; ================	EQUATES  =========================================

 COUNTER1    EQU   0x20
 COUNTER2    EQU   0x21
 COUNTER3    EQU   0x22
		
; =======================================================================				

		__CONFIG	0X3FF2		
		ORG			0X0000	
		GOTO		START
		ORG			0X0004		
		RETFIE

START   CLRW
    	BSF    STATUS, RP0			;	
		CLRF   TRISB				
		BCF    STATUS, RP0

LOOP1    MOVLW  0xFF
         MOVWF  PORTB
         CALL   DELAY
         CLRF   PORTB
         CALL   DELAY
         GOTO   LOOP1
		 		
DELAY    CLRF   COUNTER1
         CLRF   COUNTER2
         MOVLW  D'26'
         MOVWF  COUNTER3

LOOP2    DECFSZ COUNTER1,1
         GOTO   LOOP2
         DECFSZ COUNTER2,1
         GOTO   LOOP2
         DECFSZ COUNTER3,1
         GOTO   LOOP2  
         RETURN
  
END

Can you please help me find the problem?
Thanks!
 

Hi,

No error description, no help...

Just a part of code, and you want us to find out what controller you use, what clock frequency, what schematic you use...

We need a crystal ball!

Klaus
 

Should work. Possible some schematic issue. Crystal malfunction/capacitors wrong value. No idea. I can't explain why he using assembler with 20 years old microcontrolller. May be he just a history lover?
 

Zip and post the complete MPLAB project files for testing. WDT enabled ? CONFIG bits set in IDE ? MCLR enabled in IDE ? If yes, you have 10k pullup on MCLR pin ?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top