This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| arduino:uPD7228_driver_library [2021/07/30 04:20] – tony | arduino:uPD7228_driver_library [2026/10/20 08:46] (current) – tony | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| < | < | ||
| - | < | + | < |
| \\ | \\ | ||
| Line 49: | Line 49: | ||
| < | < | ||
| <div class=" | <div class=" | ||
| - | <a href="/ | + | <a href="/ |
| <div class=" | <div class=" | ||
| - | Schematic showing connections from the MGCS μPD7228 LCD to an Arduino | + | Schematic showing connections from the MGCS μPD7228 LCD to an Arduino |
| </ | </ | ||
| </ | </ | ||
| 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 " | 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 " | ||
| - | ===== 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. | ||
| Line 182: | Line 182: | ||
| ]]. | ]]. | ||
| + | * [[: | ||
| * [[: | * [[: | ||
| * [[: | * [[: | ||