Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Help

Status
Not open for further replies.

Mihindu_gajaba

New Member
Hi ,

the thing is i'm new to this i mean to the forum and also for Microcontrollers.

so from the help of this site i have learned alot.

i have written a code that make all the Ports are acting like output and making All the pins High . after that i have power up the PIC and Connect a led to RA1 but it doesnt turned on. same as the other pins i mean RA0 RA1 , can you please help me why this is happening..

Code is :

#include <p16F84A.inc>
__CONFIG _CP_OFF & _WDT_OFF

bsf STATUS,5
movlw 00h
movwf TRISA
bcf STATUS,5

movlw b'11111'
movwf PORTA

end

:( :( :(
 
Gayan Soyza said:
Code:
	org	0000h

	bsf 	STATUS,RP0
	movlw 	00h
	movwf 	TRISA
	bcf 	STATUS,RP0
	clrf	PORTA

Main	movlw	b'00000010'	;turn on RA1
	movwf	PORTA
	goto	Main

Thanks For the Help , And What about The Configuration Word
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top