[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

LPT2 problems




Hi,


I'm trying to write a driver from a graphical LCD
display based on SED1520. It doesn't work yet,
and I have no idea what can be wrong, so I've
started to look around in the Etrax source.

I've have a question about why this function
below from etrax100parlcd.c looks like it does?
For example, why sends it the instr three times?


static void display_write_instr(byte
instr)                                     
{                                                                               
  /* instr and LCD_E must be valid for 80ns
*/                                  
  *R_PAR0_CTRL_DATA = PAR_OE |
LCD_E;                                           
  *R_PAR0_CTRL_DATA = PAR_OE | LCD_E |
instr;                                   
  *R_PAR0_CTRL_DATA = PAR_OE | LCD_E |
instr;                                   
  *R_PAR0_CTRL_DATA = PAR_OE |
instr;                                           
  *R_PAR0_CTRL_DATA =
0;                                                        
}
And what about this 
"..be valid for 80ns"? I've turned
on LPT2 in head.s and use that instead, and it seems like
it keeps the values on the LPT2 until you change them.


I would be very happy is someone could explain it to me.


Thanks,

  Jonas