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.

need assembly code for 7 sec delay using pic16f886 by timer0

Status
Not open for further replies.

biswajitdas49

Member level 3
Joined
May 17, 2012
Messages
55
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
WEST BENGAL,INDIA
Activity points
1,726
hi everybody!!
I need a asm code for my project,7 sec delay using pic16f886 timer0.my OSC fq. is 4MHz,prescaler is 1:256.I want to blink 2 led from portB.each blink continuously after 7sec.
please please please, help me anybody.
thanks!!!
 

The gooligum tutorials are fantastic. They will have you writing programs in no time.

You can find them here: **broken link removed**
 
Or, from PicList:

Code:
; Delay = 7 seconds
; Clock frequency = 4 MHz

; Actual delay = 7 seconds = 7000000 cycles
; Error = 0 %

	cblock
	d1
	d2
	d3
	endc

			;6999998 cycles
	movlw	0x3F
	movwf	d1
	movlw	0x43
	movwf	d2
	movlw	0x10
	movwf	d3
Delay_0
	decfsz	d1, f
	goto	$+2
	decfsz	d2, f
	goto	$+2
	decfsz	d3, f
	goto	Delay_0

			;2 cycles
	goto	$+1

Source: http://www.piclist.com/cgi-bin/dela...s&Regs=d1+d2+d3+d4&clock=4&name=Delay&CPU=PIC

John
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top