Advertisement
saper_2

SED1330 init (SAD DEFS) for ITM400160 LCD (400x160)

Nov 11th, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.55 KB | None | 0 0
  1. // Registers
  2. #define SED_SYSTEM_SET 0x40
  3. #define SED_SLEEP_IN 0x53
  4. #define SED_DISPLAY_ONOFF 0x58
  5.     #define SED_DISPLAY_ON 0x01
  6.     #define SED_DISPLAY_OFF 0x00
  7. #define SED_DISPLAY_SCROLL 0x44
  8. #define SED_DISPLAY_CSRFORM 0x5D
  9. #define SED_DISPLAY_CGRAM_ADR 0x5C
  10. #define SED_DISPLAY_CSRDIR 0x4C
  11.     #define SED_DISPLAY_CSRDIR_LEFT 0x01
  12.     #define SED_DISPLAY_CSRDIR_RIGHT 0x00
  13.     #define SED_DISPLAY_CSRDIR_UP 0x02
  14.     #define SED_DISPLAY_CSRDIR_DOWN 0x03
  15. #define SED_DISPLAY_HDOT_SCR 0x5A
  16. #define SED_DISPLAY_OVLAY 0x5B
  17. #define SED_DRAW_CSRW 0x46
  18. #define SED_DRAW_CSRR 0x47
  19. #define SED_MEM_MWRITE 0x42
  20. #define SED_MEM_MREAD 0x43
  21. /* ****************************************************************** */
  22.     //#define SED_SAD1 0x1000
  23.     #define SED_SAD1_SIZE 0x0500 //1280
  24.     #define SED_SAD2_SIZE 0x2000 //8192
  25.     #define SED_SAD3_SIZE 0x0500 //1280
  26.     #define SED_SAD4_SIZE 0x2000 //8192
  27.     // address start offset
  28.     #define SED_SAD1 0x0000
  29.     #define SED_SAD2 0x0500
  30.     #define SED_SAD3 0x2500
  31.     #define SED_SAD4 0x3000
  32.     #define SED_SL 160 // 159 might bee too; Screen block start address - numbers of lines per display
  33.    
  34.     #define SED_SAD1L (SED_SAD1&0xff)
  35.     #define SED_SAD1H (SED_SAD1>>8)
  36.     #define SED_SAD2L (SED_SAD2&0xff)
  37.     #define SED_SAD2H (SED_SAD2>>8)
  38.     #define SED_SAD3L (SED_SAD3&0xff)
  39.     #define SED_SAD3H (SED_SAD3>>8)
  40.     #define SED_SAD4L (SED_SAD4&0xff)
  41.     #define SED_SAD4H (SED_SAD4>>8)
  42. /* ****************************************************************** */
  43. #define SED_WIDTH 400
  44. #define SED_HEIGHT 160
  45. #define SED_XTAL 4000000
  46.  
  47. #define SED_TEXT1 1
  48. #define SED_GRAPH1 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement