20 Mhz is 200nS per instruction cycle. You are making 90 passes through
four cycle loop.
200nS*90*4=72uS, 72.8 with overhead.
On Sat, 3 Feb 2001, Tweedy Bird wrote:
{Quote hidden}> Date: Sat, 3 Feb 2001 17:00:36 -0500
> From: Tweedy Bird <
spam_OUTkatkoota5TakeThisOuT
HOTMAIL.COM>
> Reply-To: pic microcontroller discussion list <
.....PICLISTKILLspam
@spam@MITVMA.MIT.EDU>
> To:
PICLIST
KILLspamMITVMA.MIT.EDU
> Subject: Re: [PIC]: delay
>
> Hi everyone,
>
> I am trying to generate a delay for the 20 MHz PIC16F877 that I
> am using to interface it to the LCD. I think I don't understand
> how to generate the delay because I know that my hardware is
> working perfectly. Can some one please tell me how to calculate
> the delay in seconds for the following code.
> Thank you
> Sarah
>
> LOOPD equ 2Ah
> .
> .
> .
>
> delay movlw .90
> movwf LOOPD
> repeat nop
> decfsz LOOPD
> goto repeat
> return
>
>
>
>
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at
http://www.hotmail.com.
>
> --
>
http://www.piclist.com hint: The PICList is archived three different
> ways. See
http://www.piclist.com/#archives for details.
>
>
--
http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.