Skip to content

LiquidCrystal improvements (support 16x4 displays) #1748

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Nov 5, 2014

Conversation

matthijskooijman
Copy link
Collaborator

This pullrequest was inspired by #55 and starts out with a cleaned up version of the main commit from that pullreq.

This allows setting custom row offsets for LCDs to support different LCD hardware configurations. Additionally, this changes the default row offsets (based on the number of columns set), so now 16x4 (and possibly others) are also supported out of the box.

msproul and others added 6 commits December 18, 2013 13:09
Original commit by Mark Sproul, but cleaned up by Matthijs Kooijman.
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.
…s 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.
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
@ArduinoBot
Copy link
Contributor

Can I build this pull request?

@edthedev
Copy link

Hooray!

@ffissore
Copy link
Contributor

@edthedev sorry for the comment from arduinobot. we are setting up automated build of all PRs, so that we can provide a downloadable version of the patched IDE

@edthedev
Copy link

Cool. No harm done. :)
On Aug 25, 2014 2:33 AM, "Federico Fissore" notifications@github.com
wrote:

@edthedev https://github.com/edthedev sorry for the comment from
arduinobot. we are setting up automated build of all PRs, so that we can
provide a downloadable version of the patched IDE


Reply to this email directly or view it on GitHub
#1748 (comment).

@matthijskooijman matthijskooijman added Version: 1.5.x feature request A request to make an enhancement (not a bug fix) and removed Version: 1.5.x labels Sep 10, 2014
@cmaglie cmaglie added this to the Release 1.5.8 milestone Sep 10, 2014
matthijskooijman referenced this pull request in Chisalita/Arduino Sep 14, 2014
Added functions to read data from LCD, to delete last character, to
delete a character at specified position, get current position, get
character from a position and get more characters at once, making it
faster.
@cmaglie
Copy link
Member

cmaglie commented Sep 23, 2014

@ArduinoBot build this please

@ArduinoBot
Copy link
Contributor

Merged build finished. Test PASSed.

@cmaglie cmaglie modified the milestones: Release 1.5.8, Release 1.5.9 Oct 13, 2014
@agdl
Copy link
Member

agdl commented Nov 3, 2014

@cmaglie works for me on linux64

@cmaglie cmaglie merged commit 9552db3 into arduino:ide-1.5.x Nov 5, 2014
@matthijskooijman
Copy link
Collaborator Author

\o/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Core Related to the code for the standard Arduino API feature request A request to make an enhancement (not a bug fix)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants