'ISR mind of its own'
|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.
INNER equ 11
OUTER equ 12
bsf PORTA, 0
Delay movwf OUTER ; loop (w) times
outerl call delayms ; at 1ms each
delayms movlw 0xC7 ; Set the inner
movwf INNER ; count
innerl nop ; 5 cycles loop
nop ; until done
bcf PORTA, 1
Send someone a cool Dynamitemail flashcard greeting!! And get rewarded.
GO AHEAD! http://cards.dynamitemail.com/index.php3?rid=fc-41
On Mon, 1 Nov 1999 23:48:29 -0500 Mike M <DYNAMITEMAIL.COM> elektrikman
> 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
- New search...