My Projects

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
arduino:metp0000_driver_library [2023/03/12 09:01] – [METP0000 Library] tonyarduino:metp0000_driver_library [2026/09/06 02:37] (current) – external edit 127.0.0.1
Line 72: Line 72:
 As mentioned earlier the library is based on a standard Arduino  LiquidCrystal.cpp LCD library.   I wrote a version (v1.30) with a "write()" function suitable for use with the standard <print.h> routines.  This worked fine, but didn't allow for controlling the decimal point - it was unable to set the decimal point as part of a digit.  Instead it had to display a blank digit with a decimal point set in the corner.  Besides looking strange, that wasted a whole digit space just to display a decimal point, and we don't have a lot of digits to play with. As mentioned earlier the library is based on a standard Arduino  LiquidCrystal.cpp LCD library.   I wrote a version (v1.30) with a "write()" function suitable for use with the standard <print.h> routines.  This worked fine, but didn't allow for controlling the decimal point - it was unable to set the decimal point as part of a digit.  Instead it had to display a blank digit with a decimal point set in the corner.  Besides looking strange, that wasted a whole digit space just to display a decimal point, and we don't have a lot of digits to play with.
  
-==== Character Set ====+==== Character set ====
 Because driving the 9 segments necessitates bypassing the 7 segment decoder, we are free to create whatever character shapes we wish out of the available segments.  To simplify development I used a 16bit word to define each character - 3 nybbles containing 3bits each, plus a fourth nybble that I occasionally used to specify the digit position (as not all digit positions are exactly the same).  If I continue to develop this driver, I might truncate this to 8bits per digit, and handle the single bits for the decimal point or comma separately.  I initially hand crafted a table of 9-bit alpha-numeric character patterns based on other peoples 7-segment character fonts.  I then came across Jose Pino's XLS spreadsheet ((http://www.josepino.com/microcontroller/7-segment-ascii)), which I modified for the 9 segments and odd coding required for this display.  In my version the results are shown as a 3 digit number suitable to use as the hex character definition in my driver.\\ Because driving the 9 segments necessitates bypassing the 7 segment decoder, we are free to create whatever character shapes we wish out of the available segments.  To simplify development I used a 16bit word to define each character - 3 nybbles containing 3bits each, plus a fourth nybble that I occasionally used to specify the digit position (as not all digit positions are exactly the same).  If I continue to develop this driver, I might truncate this to 8bits per digit, and handle the single bits for the decimal point or comma separately.  I initially hand crafted a table of 9-bit alpha-numeric character patterns based on other peoples 7-segment character fonts.  I then came across Jose Pino's XLS spreadsheet ((http://www.josepino.com/microcontroller/7-segment-ascii)), which I modified for the 9 segments and odd coding required for this display.  In my version the results are shown as a 3 digit number suitable to use as the hex character definition in my driver.\\
 {{ :arduino:metp0000:metp0000 character_set.png?600 |7 Segment character set v1.1.}} {{ :arduino:metp0000:metp0000 character_set.png?600 |7 Segment character set v1.1.}}
Line 90: Line 90:
 Overall  I'm not convinced by the results, so still a work in progress. Overall  I'm not convinced by the results, so still a work in progress.
  
-====  μPD7225 command set ====+==== μPD7225 command set ====
   * MODE SET   * MODE SET
     * initialise the controller     * initialise the controller