Commit Graph

11 Commits

Author SHA1 Message Date
Calvin Park b0278f4c15 LiquidCrystal Library changes for Galileo and Edison compatibility 2015-07-01 15:06:39 -07:00
newbie15 fe52e7f04f Added a note about non-standard row offsets in LiquidCrystal.cpp
In my case I had to change it to make my 16x4 LCD work properly

Fixes #1333
2015-05-08 12:35:04 +02:00
Cristian Maglie b0d6f42755 Merge branch 'ide-1.5.x-lcd' of github.com:matthijskooijman/Arduino 2014-11-05 17:28:30 +01:00
Cristian Maglie fd94e184a5 Merge remote-tracking branch 'arduino/master' into ide-1.5.x 2014-07-24 14:46:05 +02:00
Matthijs Kooijman 9552db3fe4 In LiquidCrystal, remove an unused variable 2013-12-18 13:09:48 +01:00
Matthijs Kooijman 8c6bcf0c84 In LiquidCrystal::begin(), use a define instead of a hardcoded 0 2013-12-18 13:09:48 +01:00
Matthijs Kooijman 265ac7b59e Support more LiquidCrystal displays out of the box
Previously, the row offsets were hardcoded to the ones used for 20x4
displays (which woudl also work for all 2-line displays). Now, the
number of columns given is used to calculate the offsets most likely to
apply.

For 2-line displays and 20x4 displays, the (used) offsets are completel
unchanged. With this change, common 16x4 displays and (if they even
exist) other 4-line and 3-line displays might also work (depending on
the hardware configuration used, of course).

See this page for some info on common LCD sizes and configurations
encountered in practice:

http://web.alfredstate.edu/weimandn/lcd/lcd_addressing/lcd_addressing_index.html
2013-12-18 13:09:48 +01:00
Matthijs Kooijman 1786716a75 In LiquidCrystal::setCursor(), check against length of _row_offsets as well
Before, the row value was maximized against _numlines already, but the
value from _numlines is not limited anywhere, so it could be longer than
the length of _row_offsets. This check makes sure the array bounds is
never exceeded.
2013-12-18 13:09:48 +01:00
Matthijs Kooijman 3fdda81a1a Make the LiquidCrystal row offsets uint8_t instead of int
Since these are memory addresses, there is no need to make them signed.
Furthermore, the HD44780 chip supports memory addresses up to 0x67, so
uint8_t shouldbe sufficient.
2013-12-18 13:09:48 +01:00
Mark Sproul 03a6b2c54a Added setRowOffsets to LiquidCrystal library
Original commit by Mark Sproul, but cleaned up by Matthijs Kooijman.
2013-12-18 13:09:48 +01:00
Fede85 9454816162 Ethernet, SD and LiquidCrystal to the new library format 2013-06-26 19:13:04 +02:00