PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

3 лет назад
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. Installation
  2. --------------------------------------------------------------------------------
  3. To install this library, just place this entire folder as a subfolder in your
  4. Arduino hardware/libraries folder.
  5. When installed, this library should look like:
  6. Arduino/hardware/libraries/ks0108 (this library's folder)
  7. Arduino/hardware/libraries/ks0108/ks0108.cpp (the library implementation file)
  8. Arduino/hardware/libraries/ks0108/ks0108.h (the library header file)
  9. Arduino/hardware/libraries/ks0108/ks0108_Panel.h (the Panel configuration header)
  10. Arduino/hardware/libraries/ks0108/ks0108_Arduino.h (header used to define pins for Atmega168/328)
  11. Arduino/hardware/libraries/ks0108/ks0108_Mega.h (header used to define pins for Mega)
  12. Arduino/hardware/libraries/ks0108/ks0108_Sanguino.h (header used to define pins for Sanguino) - untested
  13. Arduino/hardware/libraries/ks0108/SystemFont5x7.h (definition for 5x7 system fonmt)
  14. Arduino/hardware/libraries/ks0108/Arial14.h (the definition for 14 point Arial Font)
  15. Arduino/hardware/libraries/ks0108/keywords.txt (the syntax coloring file)
  16. Arduino/hardware/libraries/ks0108/examples (diectory containing the example test sketch)
  17. Arduino/hardware/libraries/ks0108/readme.txt (this file)
  18. Building
  19. --------------------------------------------------------------------------------
  20. After the files are copied into your library directory, check the wiring matches the pin configuration
  21. for your board. The defualt wiring is different for each of the three chip types:
  22. (see http://www.arduino.cc/playground/Code/GLCDks0108 for more info)
  23. ATmega168/328 uses configuration file: ks0108_Arduino.h
  24. LCD ARDUINO
  25. CSEL1 14 // CS1 Bit // swap with CSEL2 if left/right is reversed
  26. CSEL2 15 // CS2 Bit
  27. R_W 16 // R/W Bit
  28. D_I 17 // D/I Bit
  29. EN 18 // EN Bit
  30. LCD data 0-3 8-11
  31. LCD data 4-7 4-7
  32. Mega (ATmega1280) uses configuration file: ks0108_Mega.h
  33. CSEL1 33 // CS1 Bit // swap with CSEL2 if left/right is reversed
  34. CSEL2 34 // CS2 Bit
  35. R_W 35 // R/W Bit
  36. D_I 36 // D/I Bit
  37. EN 37 // EN Bit
  38. LCD data 0-7 22-29
  39. Sanguino (ATmega644) uses configuration file: ks0108_Sanguino.h
  40. CSEL1 24 // CS1 Bit // swap pin assignments with CSEL2 if left/right image is reversed
  41. CSEL2 25 // CS2 Bit
  42. R_W 26 // R/W Bit
  43. D_I 27 // D/I Bit
  44. EN 28 // EN Bit
  45. LCD data 0-7 16-23
  46. Slow panels may need delays added to the panel panel configuraion file: ks0108_Panel.h
  47. change the number 6 to a higher number to make th delay longer :
  48. #define EN_DELAY_VALUE 6 // this is the delay value that may need to be hand tuned for slow panels
  49. If your panel has a different width or height you can change these two constants in this file:
  50. #define DISPLAY_WIDTH 128
  51. #define DISPLAY_HEIGHT 64
  52. After a successful build of this library, a new file named 'ks0108.o' will appear
  53. in ks0108 library directory. If you make any changes to any of the files in the
  54. ks0108 directory you must delete ks0108.o before recompiling your sketch for the changes to be
  55. recognized by your sketch. The new "Test.o" with your code will appear after the next
  56. verify or compile (If there are no syntax errors in the changed code).
  57. To use the library in a sketch, go to the Sketch | Import Library menu and
  58. select ks0108. This will add a corresponding line to the top of your sketch:
  59. #include <ks0108.h>. It will also add lines for all the font definitions you have
  60. in the ks0108 library directory. You should remove the includes for any fonts you
  61. don't use in a sketch, they use a lot of program memory.