I am suggesting setting the port high, instantiate a timer set to interrupt
at 1ms (or whatever), then leaving the function.  When the timer interrupt
fires, set the pin low again.  Then you have only used a few clock cycles
instead of 10,000 to get your delay.  It'll be like 10-15 lines of code or
something like that between setting up a new timer and doing the interrupt
itself.


On Wed, Mar 27, 2013 at 6:03 PM, vineethh91 <notifications@github.com>wrote:

> In LCD.h:
>
> > +
> > +    /////////////////////////////
> > +    // This delay is a waste of
> > +    // processing time.
> > +    // You should start a timer
> > +    // or something like that
> > +    // to count and set a flag
> > +    // when it overflows as a
> > +    // sign to send the next
> > +    // character to the LCD
> > +    //   -- Blaine
> > +    // (I guess you don't HAVE
> > +    // to do this, but it would
> > +    // be a good idea, as it
> > +    // would be HIGHLY important
> > +    // for time-critical code.)
>
> This delay was just for the clock input to the LCD, so I didnt really try
> to lower this but I guess it couldnt hurt to try and lower it and see how
> low it can go before it starts breaking.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/477grp8/EXPLORER16_UARTDRIVERCODE/pull/1/files#r3561374>
> .
>