Page 1 of 1

LCD Component

Posted: Tue May 05, 2009 9:17 am
by echase
Would it not be a good idea to make your standard LCD component contain the lines:-

clear_bit(intcon, GIE);
set_bit(intcon, GIE);

trisb = trisb & 0x0F; //Sets the high nibble to an output
trisb = trisb | 0xF0; //Sets the high nibble to an input

in appropriate places?

This is because in real life systems it’s common to share LCD's data lines with menu pushbuttons and without the trisb lines the switches are ignored. Also interrupts seem to corrupt the LCD write process.

I find it difficult to believe that Flowcode users other then me have not met these problems.

Admittedly these problems do not affect all code and all PIC types (e.g. the interrupt problem affects my 2520 PIC but not my 886), so it isn’t essential. But it would be useful to at least have them in there commented out, with a note in the header to instruct users how to enable them and under what circumstances they may be needed.

The downsides are small, being slightly larger code and slight pauses in the interrupts.

An alternative would be to include some reference to the problem in a Help or Tutorial file.

Re: LCD Component

Posted: Sat Feb 13, 2010 7:55 pm
by ASDned
Its good to have also the 8 bits data LCD as a second option because of the timing problems in the 4 bit mode.
Best regards,
ASDned

Re: LCD Component

Posted: Mon Feb 15, 2010 2:11 pm
by Benj
Hello

8-bit data mode is a good option and we will put this on the features list.

Regarding the enabling and disabling of interrupts this is a possibility but we think its best to add this functionality yourself via the code customization feature.