Void ClearPage(uint8_t page, uint8_t color) Void WriteData(uint8_t data) // experts can make this public but the functionality is not documented Void WriteCommand(uint8_t cmd, uint8_t chip) #define ClearSysTextLine(_line) FillRect(0, (line*8), (DISPLAY_WIDTH-1), ((line*8)+ 7), WHITE )Ĭlass ks0108 // shell class for ks0108 glcd code #define ClearScreenX() FillRect(0, 0, (DISPLAY_WIDTH-1), (DISPLAY_HEIGHT-1), WHITE) #define DrawCircle(xCenter, 圜enter, radius, color) DrawRoundRect(xCenter-radius, 圜enter-radius, 2*radius, 2*radius, radius, color) #define DrawHoriLine(x, y, length, color) FillRect(x, y, length, 0, color) #define DrawVertLine(x, y, length, color) FillRect(x, y, 0, length, color) Uint8_t ReadPgmData(const uint8_t* ptr) //Standard Read Callback Typedef uint8_t (*FontCallback)(const uint8_t*) #define LCD_DISP_START 0x3E // Display start page 0 #define LCD_DATA_DIR(_val_) LCD_DATA_DIR_LOW = (_val_) #define LCD_DATA_OUT(_val_) LCD_DATA_OUT_LOW = (_val_) #else // all data on same port (low equals high) #ifdef LCD_DATA_NIBBLES // data is split over two ports #define lcdDataDir(_val_) LCD_DATA_DIR(_val_) #define lcdDataOut(_val_) LCD_DATA_OUT(_val_) #define LCD_DATA_DIR_HIGHĝDR(LCD_DATA_HIGH_NBL) // Data Direction Register for Data Port, high nibble #define LCD_DATA_OUT_HIGH PORT(LCD_DATA_HIGH_NBL) // Data Output Register - high nibble #define LCD_DATA_IN_HIGH PIN(LCD_DATA_HIGH_NBL) // Data Input Register high nibble #define LCD_DATA_DIR_LOWĝDR(LCD_DATA_LOW_NBL) // Data Direction Register for Data Port, low nibble #define LCD_DATA_OUT_LOW PORT(LCD_DATA_LOW_NBL) // Data Output Register - low nibble #define LCD_DATA_IN_LOW PIN(LCD_DATA_LOW_NBL) // Data I/O Register, low nibble paste together the port definitions if using nibbles #include "ks0108_Panel.h" // this contains LCD panel specific configuration #include "ks0108_Arduino.h" // include this for the Arduino or other ATmega168 boards #include "ks0108_Sanguino.h" // include this for Sanguino or ATmega644 boards #elif defined (_AVR_ATmega644_) // TODO - check this define #include "ks0108_Mega.h" // include this for the Arduino Mega other ATmega1280 boards #define GLCD_VERSION 2 // software version of this library added support for Mega and Sanguino, improved panel speed tolerance, added bitmap support moved chip and panel configuration into seperate header files Version: 1.1 - restructured low level code to adapt to panel speed Version: 1.0b - replaced with boolean typedef for rel 0012 Version: 1.0a - simplified command pin defines MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This library is distributed in the hope that it will be useful,īut WITHOUT ANY WARRANTY without even the implied warranty of The interface has been made more Arduino friendly In port addressing and improvements in I/O speed. To read busy status flag and support a wider range of displays, adding more flexibility You can obtain a copy of his original work here:Ĭode changes include conversion to an Arduino C++ library, rewriting the low level routines Written and copyright by Fabian Maximilian Thiele. Ks0108.h - Arduino library support for ks0108 and compatable graphic LCDsĬopyright (c)2008 Michael Margolis All right high level functions of this library are based on version 1.1 of ks0108 graphics routines What about my Mega 2560?Īnd the file Ks0108.h does not appear in the same manner: /* My lcd panel Digitron SG12864J4 is referenced as Pinout B panelīut it is written that the file "ks0108_mega.h" is compatible with the controller ATmega1280. When I try to run the example "GLCDexample.pde" it displays this message: C:\Users\Admin\Downloads\arduino-1.0-windows\arduino-1.0\libraries\ks0108\ks0108.cpp:33:67: error: wiring.h: No such file or directoryĬ:\Users\Admin\arduino-1.0-windows\arduino-1.0\libraries\ks0108\ks0108.cpp: In member function 'void ks0108::Init(boolean)':Ĭ:\Users\Admin\arduino-1.0-windows\arduino-1.0\libraries\ks0108\ks0108.cpp:505: error: 'OUTPUT' was not declared in this scopeĬ:\Users\Admin\arduino-1.0-windows\arduino-1.0\libraries\ks0108\ks0108.cpp:505: error: 'pinMode' was not declared in this scopeĬ:\Users\Admin\arduino-1.0-windows\arduino-1.0\libraries\ks0108\ks0108.cpp:511: error: 'delay' was not declared in this scope I have put the library ks0108 in the folder libraries.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |