Aditya070390
Newbie level 6
- Joined
- Dec 12, 2012
- Messages
- 14
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,384
hi,
can anybody help me out wit dis??
am using 12f508 n require 10sec delay in the code,am using internal oscillator, i hav used the code shown below but the pic is not executing the
decsfz instruction properly.it stays in the loop for ever. i used mplab ide n simulated it in mplab simulator,i hav tried several other alternatives lik using decf n btfsc instructions together!!
can anybody help me out wit dis??
am using 12f508 n require 10sec delay in the code,am using internal oscillator, i hav used the code shown below but the pic is not executing the
decsfz instruction properly.it stays in the loop for ever. i used mplab ide n simulated it in mplab simulator,i hav tried several other alternatives lik using decf n btfsc instructions together!!
Code ASM - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 ; Delay = 10 seconds ; Clock frequency = 4 MHz ; Actual delay = 10 seconds = 10000000 cycles ; Error = 0 % cblock d1 d2 d3 endc Delay ;9999995 cycles movlw 0x5A movwf d1 movlw 0xCD movwf d2 movlw 0x16 movwf d3 Delay_0 decfsz d1, f goto $+2 decfsz d2, f goto $+2 decfsz d3, f goto Delay_0 ;1 cycle nop ;4 cycles (including call) return
Last edited by a moderator: