--- In [email protected], "Geert Vancompernolle" <[EMAIL PROTECTED]> wrote: > > --- In [email protected], Smtux S <ssmtux@> wrote: > > > > Hi, > > > > thank you. > > So in your opinion using 8 bit to control a display is too heavy for > the foxboard. > > If you mean "too heavy" from a processor power point of view, well, > no, that's not what I said. I said that it's too expensive to > "sacrifice" 8 pins of the FoxBoard just to control a simple LCD. The > pins could be used for more useful things. > > It's for sure not a "big deal" for the FoxBoard to control a LCD. If > the FoxBoard would only have to do that, well, it would become > an extremely lazy fox, I'm afraid... ;-) >
There is another problem with driving a LCD with 4bits. When you are in 4 bits mode, then you send bytes in 2 times, 4 bits each time. So each command is validated after receiving the 2nd nibble of 4 bits. If, for a strange reason, the Fox restarts but the LCD doesn't and the restart occurrs between the two nibbles of a byte, then you have sent only half of the command. But when you restart the fox, you don't know that the screen is still in 4 bits mode and waiting for a 2nd nibble. So you will send commands but you will be shifted of 1 half byte and nothing will work. I didn't find a way to detect such a situation by software. On a project I worked on before, with a LCD and a PIC microcontroller, such a situation occurred, when the power was failing for a very short time. I suppose this could happen with a LCD and a Fox too. So you should consider either driving the LCD in 8 bits, which is the most secure way if you have enough pins to do it, or driving it with 4 bits but using an extra IO line to drive a transistor which will be able to switch the LCD power supply, to be able at some point to restart the LCD from the Foxboard, during bootup for example, to get back in a known state.
