Testing all ports in PIC16F877A

daredavel

New Member
Can someone help me how to set all ports in pic16f877a as output 1..to test if all ports are ok.. i'll b connecting the other end with LEDS.. thank you!!
 
is this correct sir? setting portc as output..to enable all LEDs connected..

Code:
	LIST	P=16F877A
		#include <p16f877A.inc>
		
		__CONFIG   _CP_OFF & _WDT_OFF & _PWRTE_ON & _HS_OSC
		
bcf STATUS,RP0
CLRF PORTC 

bsf	STATUS, RP0
	movlw	0x00
	movwf	TRISC

bsf	STATUS, RP0
movlw 0xff
movwf PORTC

end
 
Code:
		LIST	P=16F877A
		#include p16f877A.inc>
		
		__CONFIG   _CP_OFF & _WDT_OFF & _PWRTE_ON & _HS_OSC
		
		org	0x0000
		;
		bcf 	STATUS, RP0
		CLRF 	PORTC 

		bsf	STATUS, RP0
		movlw	0x00
		movwf	TRISC
		[COLOR="Red"]bcf[/COLOR]	STATUS, RP0
		;
		movlw 	0xff
		movwf 	PORTC

		end
 
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…