My Projects

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
arduino:uPD7228_driver_library [2022/08/18 02:55] – tonyarduino:uPD7228_driver_library [2026/10/20 08:46] (current) – tony
Line 1: Line 1:
 <html><p style="text-align:right;">Published 26 Jan 2018</p></html> <html><p style="text-align:right;">Published 26 Jan 2018</p></html>
-<html><p style="text-align:center"><b><font size="6">Arduino μPD7228 driver library</font></b></p></html>+<html><p style="text-align:center"><b><font size="6">Arduino μPD7228 Driver Library</font></b></p></html>
 \\ \\
  
Line 49: Line 49:
 <HTML> <HTML>
 <div class="shadows" style="text-align:center"> <div class="shadows" style="text-align:center">
-    <a href="/dokuwiki/_detail/arduino/uPD7228/MGCS 7228a.png" class="media"><img width="99%" src="/dokuwiki/_media/arduino/uPD7228/MGCS 7228a.png" class="media" title="Schematic MGCS to Arduino" alt="Schematic MGCS to Arduino" /></a>+    <a href="/dokuwiki/_detail/arduino/uPD7228/MGCS 7228a.png" class="media"><img width="99%" src="/dokuwiki/_media/arduino/uPD7228/MGCS_7228a.png" class="media" title="Schematic MGCS to Arduino" alt="Schematic MGCS to Arduino" /></a>
   <div class="container">   <div class="container">
-    Schematic showing connections from the MGCS μPD7228 LCD to an Arduino UNO+    Schematic showing connections from the MGCS μPD7228 LCD to an Arduino Uno
   </div>   </div>
 </div> </div>
Line 64: Line 64:
 There was no particular reason for choosing the Arduino control pins used here, apart from the clock needing to come from a pin that supports PWM, and avoiding D0 and D1 which I assume are otherwise occupied if I use the serial monitor for debugging. The pins used are specified when invoking the init() routine through declaring an instance of the LiquidCrystal_7228 class, eg "LiquidCrystal_7228 lcd(5, 2, 3, 4, 6, 9, 10, 11, 12, 13)" (busy, strobe, chip_select, command/data, reset, clock, d0, d1, d2, d3). There was no particular reason for choosing the Arduino control pins used here, apart from the clock needing to come from a pin that supports PWM, and avoiding D0 and D1 which I assume are otherwise occupied if I use the serial monitor for debugging. The pins used are specified when invoking the init() routine through declaring an instance of the LiquidCrystal_7228 class, eg "LiquidCrystal_7228 lcd(5, 2, 3, 4, 6, 9, 10, 11, 12, 13)" (busy, strobe, chip_select, command/data, reset, clock, d0, d1, d2, d3).
  
-===== 7228 Library =====+===== 7228 library =====
  
 As mentioned earlier the library is based on a standard Arduino LiquidCrystal.cpp LCD library. My implementation of these functions is not 100% the same as how the HD44780 works. Also some functions have not been implemented at all as the μPD7228 chip has no support for them, and the size of the library was getting unreasonably large already. In fact it could probably be argued that such a library should just provide high-level access to the built-in functions of the hardware, and not try to emulate anything else. But my aim was to create something that could be used as a drop-in replacement for the displays commonly commercially available (I may have to tweak the routines to provide more compatibility with the HD44780 further down the track). The library keeps track of the cursor in terms of a column and row address, which it translates into a hardware address when required. As mentioned earlier the library is based on a standard Arduino LiquidCrystal.cpp LCD library. My implementation of these functions is not 100% the same as how the HD44780 works. Also some functions have not been implemented at all as the μPD7228 chip has no support for them, and the size of the library was getting unreasonably large already. In fact it could probably be argued that such a library should just provide high-level access to the built-in functions of the hardware, and not try to emulate anything else. But my aim was to create something that could be used as a drop-in replacement for the displays commonly commercially available (I may have to tweak the routines to provide more compatibility with the HD44780 further down the track). The library keeps track of the cursor in terms of a column and row address, which it translates into a hardware address when required.