Commit Graph

6 Commits

Author SHA1 Message Date
Collin J. Doering c52292c802 Support both 5x8 and 5x10 fonts
Added LCD_FONT in lcdLib.h which is the bitmask to enable 5x8 or 5x10
font when doing the function set instruction (in the definition of
initLCD).

LCD_FONT_5x8 or LCD_FONT_5x10 should be defined to enable the intended
font. One always needs to be defined.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-10-26 22:30:44 -04:00
Collin J. Doering 7678470c3e Add switch to enable/disable ANSI escapes
Allow the user to enable or disable support for ANSI escapes by defining
LCD_ANSI_ESCAPE_ENABLE. lcdLibConfig.h has it enabled by default but for
projects where memory is tight, or ANSI escapes are not used or needed,
they can be disabled, which saves 3434 bytes of memory in my tests using
an Atmega328P.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-10-26 05:43:15 -04:00
Collin J. Doering bc48704477 First pass setting up doxygen documentation
There are a few things that still need to be commented, furthermore,
usage of the library needs to be explained in more detail. Also things
are still somewhat unorganized as the lcdLib library is packaged up with
the lcdOutput application for testing. Also a tiny USART library is
included but has nothing to do with the lcdLib except that its used by
the lcdOutput demo program. When the lcdLib library is ready it will be
split into its own repository with accompanying examples (one of which
may be the USART echo example (lcdOutput.c as of this commit).

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-10-15 01:23:11 -04:00
Collin J. Doering 435c8eb07b Fixed busy flag check
Inspired by
http://web.alfredstate.edu/weimandn/programming/lcd/ATmega328/LCD_code_index.html.
Forgot about the 'data hold time', 'address hold time' and 'enable cycle
time'. These delays should eventually be implemented as preprocessor constants.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-10-06 03:34:39 -04:00
Collin J. Doering abacb2b30a Take screen characteristics into account
The writeStringtoLCD function now wraps text correctly and proceeds to
the next line when '\n' is reached in its argument.

Note: during debugging of this feature it was noticed that the function
loop_until_LCD_BF_clear is broken, as previously suspected. This forces
delays to be placed in the clearDisplay and returnHome functions and
could cause other undefined behavior if timing requirements aren't met.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-10-06 03:14:24 -04:00
Collin J. Doering 68d60151dc Initial commit to branch; split done but untested
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-10-04 22:49:15 -04:00