Jim,
I agree with Quentin. The routine looks fine and I use the $ notation
all the time without problems. You are probably setting W with some
value before the delay routine that you want to have after the delay
routine returns. The other suggestion about the routine being on a page
boundary is a possibility. Look at the .LST file generated by MPLAB or
MPASM and see how big the application is.
Adam
On Thu, 11 Nov 1999 10:29:15 -0800 James Paul <.....jimKILLspam
.....JPES.COM> writes:
{Quote hidden}> All,
>
> Looking at the two routines below, can anyone tell me what the
> differences are regarding functionality?
>
> I am using the 2nd routine right now as a delay of 41 uS in an
> LCD write routine. All works well. But, if I substitute
> the first routine in place of the second, when the circuit is
> powered up, all I get on the LCD is gibberish. I don't quite
> understand this. I'm waiting the same amount of time in both
> of the timing routines. They both are entered and exited the
> same way. I'd appreciate any feedback on this question.
> I'd really like to know why the second routine works, but the
> first one doesn't.
>
>
> Thanks and Regards,
>
> Jim
>
>
>
>
>
> delay:
> movlw 0x0C
> movwf tmr5
> decfsz tmr5
> goto $-1
> nop
> nop
> return
>
>
>
>
>
> delay:
> nop
> nop
> nop
> nop
> nop
> nop
> nop
> nop
> nop
> nop
> nop
> nop
> nop
> nop
> nop
> nop
> nop
> nop
> nop
> nop
> nop
> nop
> nop
> nop
> nop
> nop
> nop
> nop
> nop
> nop
> nop
> nop
> nop
> nop
> nop
> nop
> nop
> nop
> nop
> return
>
>
EraseMEjimspam_OUT
TakeThisOuTjpes.com
Adam Bryant (age 0x23)
adamdb
spam_OUTjuno.com
Parker, CO, USA
Robotics, RC Airplanes, anything using a PIC
___________________________________________________________________
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.