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.

Assembly program in Micro C

Status
Not open for further replies.

PA3040

Advanced Member level 3
Joined
Aug 1, 2011
Messages
883
Helped
43
Reputation
88
Reaction score
43
Trophy points
1,308
Activity points
6,936
Code:
status        equ		0x03
portb		equ		0x06
trisb		equ		0x86

start		goto	main
main		clrwdt
			call	        sys_init
			call	        led_rotate
			goto	        main

led_rotate	        bsf		portb,0
loop		        rlf		portb,1
			btfss	        portb,7
			goto	        $-2
			rrf		portb,1
			btfss	        portb,0
			goto	        $-2
			goto	        loop

sys_init	        bsf		status,5
			movlw	0x00
			movwf	trisb
			bcf		status,5
			clrf	        portb
			return
end

Dear All above program I written in assembly, rotate from RB7 to RB0 and again RB0
to RB7 and loop forever

can I have the same program above In Micro C Language

Thanks in advance
 

can any one help on this
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top