Have solved was a signal problem
--- In [email protected], "f_lamme" <[EMAIL PROTECTED]> wrote:
>
> I have changed my function so
> 
> void lcd_put_byte(unsigned int value, char clk, int reg)
> {
>       unsigned int val2;
>         val2 = value<<8;
>       gpiosetbits(PORTG, val2 & 0xff00);
>       gpioclearbits(PORTG, (~val2) & 0xff00);        
>         gpioclearbits(PORTG, PG1);
>       gpiosetbits(PORTG, PG3);
>       gpioclearbits(PORTG, PG3);
>       if (clk==1)
>       {
>               gpiosetbits(PORTG, PG3);
>               gpioclearbits(PORTG, PG3);
>       }       
>       gpiosetbits(PORTG, PG1);
>       
> }
> 
> When I call the function I do such a thing
>         adr=(r-1)*240+(c-1);
>       byte=((adr >> 16) & 0x00000001);
>       banco=(banco << 1) & 0x03;
>       byte=byte | banco;
>       gpioclearbits(PORTG, PG16);
>       gpioclearbits(PORTG, PG17);
>       gpioclearbits(PORTG, PG18);
>       lcd_put_byte(byte,0,REG0);
> 
> With the old system everything was working slowly, but now the
> dispatch of the data to the dislpay does not work
> > > PG8-PG15
> > >
> > > --- In [email protected], John Crispin <john@> wrote:
> > >>
> > >> hi
> > >>
> > >> gpiosetbits(PORTG, (value << 8) & 0xffffff00);
> > >> gpioclearbits(PORTG, (~value << 8) & 0xffffff00);
> > >>
> > >>
> > >> although the & 0xffffff00 bit is not really needed, it is just for
> > > sanity
> > >>
> > >> john
> > >>
> > >> >        if (value&0x01)
> > >> >                gpiosetbits(PORTG, PG8);
> > >> >        else
> > >> >                gpioclearbits(PORTG, PG8);
> > >> >        if (value&0x02)
> > >> >                gpiosetbits(PORTG, PG9);
> > >> >        else
> > >> >                gpioclearbits(PORTG, PG9);
> > >> >        if (value&0x04)
> > >> >                gpiosetbits(PORTG, PG10);
> > >> >        else
> > >> >                gpioclearbits(PORTG, PG10);
> > >> >        if (value&0x08)
> > >> >                gpiosetbits(PORTG, PG11);
> > >> >        else
> > >> >                gpioclearbits(PORTG, PG11);
> > >> >        if (value&0x10)
> > >> >                gpiosetbits(PORTG, PG12);
> > >> >        else
> > >> >                gpioclearbits(PORTG, PG12);
> > >> >        if (value&0x20)
> > >> >                gpiosetbits(PORTG, PG13);
> > >> >        else
> > >> >                gpioclearbits(PORTG, PG13);
> > >> >        if (value&0x40)
> > >> >                gpiosetbits(PORTG, PG14);
> > >> >        else
> > >> >                gpioclearbits(PORTG, PG14);
> > >> >        if (value&0x80)
> > >> >                gpiosetbits(PORTG, PG15);
> > >> >        else
> > >> >                gpioclearbits(PORTG, PG15);
> > >> >        // cs e clk
> > >> >        gpioclearbits(PORTG, PG1);
> > >> >        gpiosetbits(PORTG, PG3);
> > >> >        gpioclearbits(PORTG, PG3);
> > >> >        if (clk==1)
> > >> >        {
> > >> >                gpiosetbits(PORTG, PG3);
> > >> >                gpioclearbits(PORTG, PG3);
> > >> >        }
> > >> >        gpiosetbits(PORTG, PG1);
> > >> >
> > >> > }
> > >> > the problem and the slowness with which the byte is sent
> because the
> > >> > byte is sent bit per bit.
> > >> > Does a way exist to send a whole byte?
> > >> > I excuse but I do not speak English very well
> > >> >
> > >> >
> > >>
> > >
> > >
> > >
> >
>


Reply via email to