I think it's not all about the program? because the circuit works well on my breadboard.A quick look of your code, also tell me what something is wrong with your this statement.
I do not think the General Purpose Registers in your chip. Are at address 0x0C in your chipRich (BB code):CBLOCK 0x0C FIRST SECOND THIRD ENDC
From the image, they look very near to each other but there's actually a lot of space from the spots you pointed out.I also see some places possible areas with solder bridges. Marked with red circles. I can not tell from the photo but check them out
list p=16f877A ; list directive to define processor
#include <p16f877A.inc> ; processor specific variable definitions
__CONFIG _CP_OFF & _WDT_OFF & _BODEN_OFF & _PWRTE_ON & _XT_OSC & _WRT_OFF & _LVP_OFF & _CPD_OFF
CBLOCK 0x21
FIRST
SECOND
THIRD
ENDC
ORG 0x000
goto main ; go to beginning of program
ORG 0x004
; isr code can go here
main
BANKSEL TRISC
MOVLW 0x00
MOVWF TRISC
BANKSEL PORTC
FORWARD:
MOVLW B'00000001'
MOVWF PORTC
CALL DELAY
MOVLW B'00000000'
MOVWF PORTC
CALL DELAY
GOTO FORWARD
DELAY ; 1 second delay
MOVLW .2
MOVWF THIRD
LOOP_1_SEC:
MOVLW .250
MOVWF SECOND
LOOP_125_MS:
MOVLW .250
MOVWF FIRST
LOOP_.5_MS:
NOP
DECFSZ FIRST,F
GOTO LOOP_.5_MS
DECFSZ SECOND,F
GOTO LOOP_125_MS
DECFSZ THIRD,F
GOTO LOOP_1_SEC
return
END
Give it one more change. But go over the boards and check for shorts and bad solder joints. Your error is typical for a bad solderjoint. And use a flat screwdriver between solder joints to remove any solder residue.My bad I can't really make it work. I guess I'll be abandoning it and make a better PCB design for this. Thanks for the help guys!
After desoldering few components to change it, it messed up the copper board and it broke the connecting lines so I better make a better PCB design since I made the old design by just 1 day. Thank you for the supportGive it one more change. But go over the boards and check for shorts and bad solder joints. Your error is typical for a bad solderjoint. And use a flat screwdriver between solder joints to remove any solder residue.
But if you create a new board. You must include series resistor on the LEDs.
You may also want to turn down the heat on your soldering iron if the copper is de-laminating from the board.After desoldering few components to change it, it messed up the copper board and it broke the connecting lines so I better make a better PCB design since I made the old design by just 1 day. Thank you for the support
Thread starter | Similar threads | Forum | Replies | Date |
---|---|---|---|---|
P | How ADC value stores inside ADRESH and ADRESL register for pic16f877a .. #2 | Microcontrollers | 1 | |
microcontroller pic16f877a | Homework Help | 1 | ||
T | ARDUINO CODE TO PIC16F877A CODE | Microcontrollers | 1 | |
L | PIC16f877a Oscillator Frequency problem | Microcontrollers | 1 | |
PIC16F877A oscillator | Microcontrollers | 4 |
by Jake Hertz
by Duane Benson
by Jake Hertz