Sunday, February 26, 2012

Propeller LCD and RTC work (cont.)

In a previous post, I mentioned that I was working on an I2C LCD driver.  I have decided to support both I2C and parallel interfaces to common LCD displays that utilize the popular Hitachi HD44780 controller chip.

This work is largely completed at this point although there is some clean-up work to be done.  One of the dilemmas I face is the question of how to implement cursor positioning.  It is simple enough to envision an API that sets the cursor to some row/column pair, but should those rows and columns be zero-based or one-based values?

I have worked forever on systems wherein all such values are zero based.  There does appear to be however some precident for using one-based values.  For the moment, I have implemented two APIs, one that is zero-based and the other one-based.  Perhaps that is an acceptable, albeit confusing solution.

I welcome any thoughts anyone might have on the topic.

1 comment:

  1. As Spin has commands LOOKUP and LOOKUPZ for 1- and 0-based lookups, I guess there is a precedent for including both options.