Truncated match.
PICList
Thread
'ISR mind of its own'
1999\11\01@235436
by
Mike M
|
The code i wrote below was taken out of another program i was working on but hav
ing trouble with the delay routine. When i simulate it with MPLAB by stepping t
hrough line for line i notice that in the countdown loop for the delay when the
variable INNER = 0, it should execute the line "bcf PORTA, 0"..instead it jumps
to address 0X004. The program is written as i simulated it i also tried setting
the Option register to 0 as well as intcon, still jumps to address h004. Any i
deas? maybe an error in my coding that im overlooking.
list P=16C84
include "p16c84.inc"
RADIX DEC
INNER equ 11
OUTER equ 12
movlw 0
movwf INTCON
movlw 0
tris PORTA
clrf PORTA
bsf PORTA, 0
movlw 5
Delay movwf OUTER ; loop (w) times
outerl call delayms ; at 1ms each
decfsz OUTER,f
goto outerl
return
delayms movlw 0xC7 ; Set the inner
movwf INNER ; count
innerl nop ; 5 cycles loop
nop ; until done
decfsz INNER,f
goto innerl
bcf PORTA, 1
END
MiKe
Send someone a cool Dynamitemail flashcard greeting!! And get rewarded.
GO AHEAD! http://cards.dynamitemail.com/index.php3?rid=fc-41
1999\11\02@092843
by
Mike Keitz
On Mon, 1 Nov 1999 23:48:29 -0500 Mike M <spam_OUTelektrikmanTakeThisOuT
DYNAMITEMAIL.COM>
writes:
>
> list P=16C84
> include "p16c84.inc"
> RADIX DEC
>
> INNER equ 11
Location 11 (decimal) on a 16C84 is the INTCON register. Trying to use
it like RAM will cause a problem. The general-purpose RAM starts at 12
(decimal) or 0x0C.
___________________________________________________________________
Get the Internet just the way you want it.
Free software, free e-mail, and free Internet access for a month!
Try Juno Web: dl.http://www.juno.com/dynoget/tagj.
More... (looser matching)
- Last day of these posts
- In 1999
, 2000 only
- Today
- New search...