树莓派点亮US1601S芯片的HYG1286494G屏幕

程序&源码 CN-P5 640℃ 0评论
内容纲要

0x00

之前在网上淘了几块HYG1286494G,是从用电终端上拆的。一直放着吃灰,这次正好研究了下驱动芯片是US1601S,根据网上的代码和研究成功点亮。

硬件

测试用的树莓派zero 屏幕的针脚定义 针脚定义

软件

使用python写的代码,依赖RPi.GPIO。可以使用下面命令安装pip install RPi.GPIO。 程序:

#-*- coding: UTF-8 -*-
import RPi.GPIO as GPIO
import commands, time

LCD_CS = 11   #BOARD
LCD_RES = 13
LCD_A0 = 15
LCD_SCK = 12
LCD_SDA = 16

def get_cpu_temp():
    tempFile = open(/sys/class/thermal/thermal_zone0/temp)
    cpu_temp = tempFile.read()
    tempFile.close
    return float(cpu_temp) / 1000

def get_gpu_temp():
    gpu_temp = commands.getoutput(/opt/vc/bin/vcgencmd measure_temp).replace('temp=', '').replace('\'C', '')
    return float(gpu_temp)

def main():
    io_init()
    lcd_init()
    while True:
#    lcd_ascii168_string(1, 0, Test)
#    lcd_ascii168_string(1, 2, test 2)
        lcd_ascii168_string(1, 0, !@#$%^&*()ABCDEFG)
        lcd_ascii168_string(1, 2, 1234567890abcdefg)
        lcd_ascii168_string(1, 4, [ CPU : %.2f ] % get_cpu_temp())
        lcd_ascii168_string(1, 6, [ GPU : %.2f ] % get_gpu_temp())
        time.sleep(3)
        #lcd_picture(0,0,0)

def io_init():
    GPIO.setmode(GPIO.BOARD)
    GPIO.setwarnings(False)
    GPIO.setup(LCD_CS, GPIO.OUT)
    GPIO.setup(LCD_RES, GPIO.OUT)
    GPIO.setup(LCD_A0, GPIO.OUT)
    GPIO.setup(LCD_SCK, GPIO.OUT)
    GPIO.setup(LCD_SDA, GPIO.OUT)

def lcd_init():
    GPIO.output(LCD_CS, True)
    GPIO.output(LCD_RES, False)
    GPIO.output(LCD_RES, True)
    lcd_transfer_data(0xe2, 0)
    #time.sleep(2)
    lcd_transfer_data(0xae, 0)   #Display Off
    lcd_transfer_data(0xa0, 0)   #DDRAM
    lcd_transfer_data(0xc4, 0)   #Set LCD Mapping Control
    lcd_transfer_data(0x88, 0)   #Set RAM Address Control
    lcd_transfer_data(0xa6, 0)   #Set The LCD Display(Normal)
    lcd_transfer_data(0xa4, 0)   #Sets Display all points 0: normal display
    lcd_transfer_data(0xa1, 0)   #Set Frame Rate 1=100fps
    lcd_transfer_data(0x2f, 0)    #Set Power Control : Internal VLCD
    lcd_transfer_data(0x26, 0)   # Set Temperature Compensation : 10b=-0.15%, 00b=0%
    lcd_transfer_data(0x81, 0)   #Set VBIAS Potentiometer
    lcd_transfer_data(0xc0, 0)   #
    lcd_transfer_data(0xaf, 0)   #Display ON
    lcd_clear()

def lcd_picture(xPos, yPos, char):
    for i in range(0, 8):
        lcd_set_page(yPos + i, xPos)
        for j in range(128 * i, 128 * (i + 1)): 
            lcd_transfer_data(PICTURE[char][j], 1)

def lcd_ascii168_string(xPos, yPos, string):
    stringLen = len(string)
    for i in range(0, stringLen):
        lcd_ascii168(xPos + i * 8, yPos, ord(string[i]) - 32)

def lcd_ascii168(xPos, yPos, char):
    lcd_set_page(yPos, xPos)
    for i in range(0, 8): 
        lcd_transfer_data(ASCII168[char][i], 1)
    lcd_set_page(yPos + 1, xPos)   
    for i in range(8, 16): 
        lcd_transfer_data(ASCII168[char][i], 1)

def lcd_clear():
   GPIO.output(LCD_CS, False)
   for i in range(0, 8):
      lcd_set_page(i, 0)
      for j in range(0, 128):
         lcd_transfer_data(0x00,1)
   GPIO.output(LCD_CS, True)

def lcd_set_page(page, column):
    lcd_transfer_data(((page & 0xf) | 0xb0), 0)
    lcd_transfer_data((((column & 0xf0) >> 4) | 0x10), 0)
    lcd_transfer_data((column & 0x0f), 0)

def lcd_transfer_data(value, SI):
    GPIO.output(LCD_CS, False)
    GPIO.output(LCD_SCK, True)
    if (SI):
        GPIO.output(LCD_A0, True)
    else:
        GPIO.output(LCD_A0, False)
    lcd_byte(value)
    GPIO.output(LCD_CS, True)

def lcd_set_contrast(value):
    lcd_transfer_data(0x80, 0)
    lcd_transfer_data(value, 0)

def lcd_byte(bits):
    tmp = bits;
    for i in range(0, 8): 
        GPIO.output(LCD_SCK, False)
        if (tmp & 0x80):
            GPIO.output(LCD_SDA, True)
        else:
            GPIO.output(LCD_SDA, False)
        tmp = (tmp < < 1)
        GPIO.output(LCD_SCK, True)

ASCII168 = (
    (0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00),# ,0
    (0x00,0x00,0x00,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x33,0x30,0x00,0x00,0x00),#!,1
    (0x00,0x10,0x0C,0x06,0x10,0x0C,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00),#,2
    (0x40,0xC0,0x78,0x40,0xC0,0x78,0x40,0x00,0x04,0x3F,0x04,0x04,0x3F,0x04,0x04,0x00),##,3
    (0x00,0x70,0x88,0xFC,0x08,0x30,0x00,0x00,0x00,0x18,0x20,0xFF,0x21,0x1E,0x00,0x00),#$,4
    (0xF0,0x08,0xF0,0x00,0xE0,0x18,0x00,0x00,0x00,0x21,0x1C,0x03,0x1E,0x21,0x1E,0x00),#%,5
    (0x00,0xF0,0x08,0x88,0x70,0x00,0x00,0x00,0x1E,0x21,0x23,0x24,0x19,0x27,0x21,0x10),#&,6
    (0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xB0,0x70,0x00,0x00,0x00,0x00,0x00),#,,7
    (0x00,0x00,0x00,0xE0,0x18,0x04,0x02,0x00,0x00,0x00,0x00,0x07,0x18,0x20,0x40,0x00),#(,8
    (0x00,0x02,0x04,0x18,0xE0,0x00,0x00,0x00,0x00,0x40,0x20,0x18,0x07,0x00,0x00,0x00),#),9
    (0x40,0x40,0x80,0xF0,0x80,0x40,0x40,0x00,0x02,0x02,0x01,0x0F,0x01,0x02,0x02,0x00),#*,10
    (0x00,0x00,0x00,0xF0,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x1F,0x01,0x01,0x01,0x00),#+,11
    (0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xB0,0x70,0x00,0x00,0x00,0x00,0x00),#,,12
    (0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01),#-,13
    (0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,0x00,0x00),#.,14
    (0x00,0x00,0x00,0x00,0x80,0x60,0x18,0x04,0x00,0x60,0x18,0x06,0x01,0x00,0x00,0x00),#/,15
    (0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x0F,0x10,0x20,0x20,0x10,0x0F,0x00),#0,16
    (0x00,0x10,0x10,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00),#1,17
    (0x00,0x70,0x08,0x08,0x08,0x88,0x70,0x00,0x00,0x30,0x28,0x24,0x22,0x21,0x30,0x00),#2,18
    (0x00,0x30,0x08,0x88,0x88,0x48,0x30,0x00,0x00,0x18,0x20,0x20,0x20,0x11,0x0E,0x00),#3,19
    (0x00,0x00,0xC0,0x20,0x10,0xF8,0x00,0x00,0x00,0x07,0x04,0x24,0x24,0x3F,0x24,0x00),#4,20
    (0x00,0xF8,0x08,0x88,0x88,0x08,0x08,0x00,0x00,0x19,0x21,0x20,0x20,0x11,0x0E,0x00),#5,21
    (0x00,0xE0,0x10,0x88,0x88,0x18,0x00,0x00,0x00,0x0F,0x11,0x20,0x20,0x11,0x0E,0x00),#6,22
    (0x00,0x38,0x08,0x08,0xC8,0x38,0x08,0x00,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00),#7,23
    (0x00,0x70,0x88,0x08,0x08,0x88,0x70,0x00,0x00,0x1C,0x22,0x21,0x21,0x22,0x1C,0x00),#8,24
    (0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x00,0x31,0x22,0x22,0x11,0x0F,0x00),#9,25
    (0x00,0x00,0x00,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00),#:,26
    (0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x60,0x00,0x00,0x00,0x00),#;,27
    (0x00,0x00,0x80,0x40,0x20,0x10,0x08,0x00,0x00,0x01,0x02,0x04,0x08,0x10,0x20,0x00),#<,28
    (0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x00,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x00),#=,29
    (0x00,0x08,0x10,0x20,0x40,0x80,0x00,0x00,0x00,0x20,0x10,0x08,0x04,0x02,0x01,0x00),#>,30
    (0x00,0x70,0x48,0x08,0x08,0x08,0xF0,0x00,0x00,0x00,0x00,0x30,0x36,0x01,0x00,0x00),#?,31
    (0xC0,0x30,0xC8,0x28,0xE8,0x10,0xE0,0x00,0x07,0x18,0x27,0x24,0x23,0x14,0x0B,0x00),#@,32
    (0x00,0x00,0xC0,0x38,0xE0,0x00,0x00,0x00,0x20,0x3C,0x23,0x02,0x02,0x27,0x38,0x20),#A,33
    (0x08,0xF8,0x88,0x88,0x88,0x70,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x11,0x0E,0x00),#B,34
    (0xC0,0x30,0x08,0x08,0x08,0x08,0x38,0x00,0x07,0x18,0x20,0x20,0x20,0x10,0x08,0x00),#C,35
    (0x08,0xF8,0x08,0x08,0x08,0x10,0xE0,0x00,0x20,0x3F,0x20,0x20,0x20,0x10,0x0F,0x00),#D,36
    (0x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,0x20,0x3F,0x20,0x20,0x23,0x20,0x18,0x00),#E,37
    (0x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,0x20,0x3F,0x20,0x00,0x03,0x00,0x00,0x00),#F,38
    (0xC0,0x30,0x08,0x08,0x08,0x38,0x00,0x00,0x07,0x18,0x20,0x20,0x22,0x1E,0x02,0x00),#G,39
    (0x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,0x20,0x3F,0x21,0x01,0x01,0x21,0x3F,0x20),#H,40
    (0x00,0x08,0x08,0xF8,0x08,0x08,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00),#I,41
    (0x00,0x00,0x08,0x08,0xF8,0x08,0x08,0x00,0xC0,0x80,0x80,0x80,0x7F,0x00,0x00,0x00),#J,42
    (0x08,0xF8,0x88,0xC0,0x28,0x18,0x08,0x00,0x20,0x3F,0x20,0x01,0x26,0x38,0x20,0x00),#K,43
    (0x08,0xF8,0x08,0x00,0x00,0x00,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x20,0x30,0x00),#L,44
    (0x08,0xF8,0xF8,0x00,0xF8,0xF8,0x08,0x00,0x20,0x3F,0x00,0x3F,0x00,0x3F,0x20,0x00),#M,45
    (0x08,0xF8,0x30,0xC0,0x00,0x08,0xF8,0x08,0x20,0x3F,0x20,0x00,0x07,0x18,0x3F,0x00),#N,46
    (0xE0,0x10,0x08,0x08,0x08,0x10,0xE0,0x00,0x0F,0x10,0x20,0x20,0x20,0x10,0x0F,0x00),#O,47
    (0x08,0xF8,0x08,0x08,0x08,0x08,0xF0,0x00,0x20,0x3F,0x21,0x01,0x01,0x01,0x00,0x00),#P,48
    (0xE0,0x10,0x08,0x08,0x08,0x10,0xE0,0x00,0x0F,0x18,0x24,0x24,0x38,0x50,0x4F,0x00),#Q,49
    (0x08,0xF8,0x88,0x88,0x88,0x88,0x70,0x00,0x20,0x3F,0x20,0x00,0x03,0x0C,0x30,0x20),#R,50
    (0x00,0x70,0x88,0x08,0x08,0x08,0x38,0x00,0x00,0x38,0x20,0x21,0x21,0x22,0x1C,0x00),#S,51
    (0x18,0x08,0x08,0xF8,0x08,0x08,0x18,0x00,0x00,0x00,0x20,0x3F,0x20,0x00,0x00,0x00),#T,52
    (0x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00),#U,53
    (0x08,0x78,0x88,0x00,0x00,0xC8,0x38,0x08,0x00,0x00,0x07,0x38,0x0E,0x01,0x00,0x00),#V,54
    (0xF8,0x08,0x00,0xF8,0x00,0x08,0xF8,0x00,0x03,0x3C,0x07,0x00,0x07,0x3C,0x03,0x00),#W,55
    (0x08,0x18,0x68,0x80,0x80,0x68,0x18,0x08,0x20,0x30,0x2C,0x03,0x03,0x2C,0x30,0x20),#X,56
    (0x08,0x38,0xC8,0x00,0xC8,0x38,0x08,0x00,0x00,0x00,0x20,0x3F,0x20,0x00,0x00,0x00),#Y,57
    (0x10,0x08,0x08,0x08,0xC8,0x38,0x08,0x00,0x20,0x38,0x26,0x21,0x20,0x20,0x18,0x00),#Z,58
    (0x00,0x00,0x00,0xFE,0x02,0x02,0x02,0x00,0x00,0x00,0x00,0x7F,0x40,0x40,0x40,0x00),#[,59
    (0x00,0x00,0x00,0x00,0x80,0x60,0x18,0x04,0x00,0x60,0x18,0x06,0x01,0x00,0x00,0x00),#/,60
    (0x00,0x02,0x02,0x02,0xFE,0x00,0x00,0x00,0x00,0x40,0x40,0x40,0x7F,0x00,0x00,0x00),#],61
    (0x00,0x00,0x04,0x02,0x02,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00),#^,62
    (0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01),#-,63
    (0x00,0x0C,0x30,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x06,0x38,0xC0,0x00),#\,64
    (0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x19,0x24,0x22,0x22,0x22,0x3F,0x20),#a,65
    (0x08,0xF8,0x00,0x80,0x80,0x00,0x00,0x00,0x00,0x3F,0x11,0x20,0x20,0x11,0x0E,0x00),#b,66
    (0x00,0x00,0x00,0x80,0x80,0x80,0x00,0x00,0x00,0x0E,0x11,0x20,0x20,0x20,0x11,0x00),#c,67
    (0x00,0x00,0x00,0x80,0x80,0x88,0xF8,0x00,0x00,0x0E,0x11,0x20,0x20,0x10,0x3F,0x20),#d,68
    (0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x22,0x22,0x22,0x22,0x13,0x00),#e,69
    (0x00,0x80,0x80,0xF0,0x88,0x88,0x88,0x18,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00),#f,70
    (0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x6B,0x94,0x94,0x94,0x93,0x60,0x00),#g,71
    (0x08,0xF8,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20),#h,72
    (0x00,0x80,0x98,0x98,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00),#i,73
    (0x00,0x00,0x00,0x80,0x98,0x98,0x00,0x00,0x00,0xC0,0x80,0x80,0x80,0x7F,0x00,0x00),#j,74
    (0x08,0xF8,0x00,0x00,0x80,0x80,0x80,0x00,0x20,0x3F,0x24,0x02,0x2D,0x30,0x20,0x00),#k,75
    (0x00,0x08,0x08,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00),#l,76
    (0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x20,0x3F,0x20,0x00,0x3F,0x20,0x00,0x3F),#m,77
    (0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20),#n,79
    (0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00),#o,80
    (0x80,0x80,0x00,0x80,0x80,0x00,0x00,0x00,0x80,0xFF,0xA1,0x20,0x20,0x11,0x0E,0x00),#p,81
    (0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x0E,0x11,0x20,0x20,0xA0,0xFF,0x80),#q,82
    (0x80,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x20,0x20,0x3F,0x21,0x20,0x00,0x01,0x00),#r,83
    (0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x33,0x24,0x24,0x24,0x24,0x19,0x00),#s,84
    (0x00,0x80,0x80,0xE0,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x1F,0x20,0x20,0x00,0x00),#t,85
    (0x80,0x80,0x00,0x00,0x00,0x80,0x80,0x00,0x00,0x1F,0x20,0x20,0x20,0x10,0x3F,0x20),#u,86
    (0x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x00,0x01,0x0E,0x30,0x08,0x06,0x01,0x00),#v,87
    (0x80,0x80,0x00,0x80,0x00,0x80,0x80,0x80,0x0F,0x30,0x0C,0x03,0x0C,0x30,0x0F,0x00),#w,88
    (0x00,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x31,0x2E,0x0E,0x31,0x20,0x00),#x,89
    (0x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x80,0x81,0x8E,0x70,0x18,0x06,0x01,0x00),#y,90
    (0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x21,0x30,0x2C,0x22,0x21,0x30,0x00),#z,91
    (0x00,0x00,0x00,0x00,0x80,0x7C,0x02,0x02,0x00,0x00,0x00,0x00,0x00,0x3F,0x40,0x40),#{,92
    (0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00),#|,93
    (0x00,0x02,0x02,0x7C,0x80,0x00,0x00,0x00,0x00,0x40,0x40,0x3F,0x00,0x00,0x00,0x00),#},94
    (0x00,0x06,0x01,0x01,0x02,0x02,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00),#~,95
)

PICTURE = (
    (0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0xF0,0xF8,0x58,0x1C,0x1C,0x0C,0x0C,0x06,0x86,0x86,0x86,0x0E,
    0x0E,0x06,0x0E,0x1E,0x1C,0x1C,0x0C,0x3C,0x38,0x78,0xF0,0xE0,0xC0,0xC0,0xE0,0x70,
    0x38,0x18,0x1C,0x1C,0x0C,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x86,0x86,0x06,0x04,0x0C,
    0x0C,0x18,0xF8,0xF8,0xF8,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x03,0x0F,0x3F,0x7C,0xF0,0xC0,0xC0,0xC0,0xC0,0x00,0x01,0x01,
    0x03,0x02,0x06,0x04,0x04,0x1C,0xB8,0xF0,0xE0,0x70,0x30,0x1F,0x0F,0x0F,0x3F,0x30,
    0xF0,0xE0,0xB0,0x18,0x08,0x0C,0x04,0x06,0x02,0x01,0x01,0x00,0x00,0x00,0x00,0xC0,
    0xF0,0xF8,0x7F,0x1F,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xE0,0xF3,0x33,0x3F,0x1F,0x1E,0x0E,0x0E,
    0x0C,0x0C,0xEC,0xEC,0xEE,0xBE,0x0F,0x0F,0x07,0x06,0x02,0x02,0x02,0x02,0x02,0x06,
    0x06,0x0F,0x0F,0xBE,0xEE,0xCC,0x8C,0x0C,0x0C,0x0C,0x0E,0x1E,0x1E,0x3F,0x73,0xE1,
    0xC1,0x00,0x36,0x25,0x55,0x5D,0x49,0x6D,0x32,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x80,0xC0,0xE0,0x70,0x7F,0x7F,0x3F,0xFC,0xFC,0xFC,0x3C,0x1C,0x0E,
    0x07,0x07,0x03,0x03,0x03,0x03,0x03,0x02,0x06,0x0E,0x1C,0xFC,0xFC,0xFC,0x3C,0x0E,
    0x06,0x02,0x03,0x03,0x03,0x03,0x03,0x03,0x07,0x06,0x0C,0x18,0x78,0xF0,0xF0,0x33,
    0x7F,0x7F,0x70,0xF0,0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0xFF,0xFF,0x83,0x00,0x00,0x00,0x00,0xC0,0xFF,0xFF,0xF0,0xF0,0xF0,0x80,
    0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0xC0,0x60,0x78,0x7F,0x7F,0x7F,0x7C,0x70,
    0xE0,0xC0,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0xC0,0xE0,0xFF,0xFF,0xC0,
    0x00,0x00,0x00,0x00,0xC3,0xFF,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x03,0x0F,0x3E,0xFC,0xFC,0x0E,0x03,0x03,0x03,0x03,0x07,0x07,0x0F,
    0x1F,0x3F,0x7F,0xFF,0xFF,0x07,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x01,0x03,0xFF,0xFF,0x7F,0x1F,0x0F,0x07,0x07,0x03,0x01,0x01,0x01,0x01,
    0x03,0xFE,0xFE,0x7E,0x07,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x07,0x1F,0x3C,0x78,0x70,0xE0,0xE0,0xE0,0xC0,
    0xC0,0xC0,0xC0,0xE1,0xFF,0x7F,0x7F,0x3C,0x3C,0x3C,0x38,0x30,0x30,0x30,0x30,0x38,
    0x38,0x3C,0x3C,0x7F,0xFF,0xE1,0xC0,0xC0,0xC0,0xC0,0xC0,0xE0,0x60,0x70,0x38,0x38,
    0x1E,0x0F,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,
    0x01,0x03,0x03,0x07,0x07,0x0E,0x18,0x18,0x38,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
    0x38,0x18,0x1C,0x1E,0x0F,0x07,0x03,0x03,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00),
)

main()

更新

板子和程序已经更新支持中文,参考树莓派应用HYG12864显示信息

参考资料

  1. 点亮了用电终端带的US1601S芯片驱动的HYG1286494G-bT62L-VD屏
  2. 树莓派ST7565P-12864液晶屏操作

转载请注明:黑白的自留地 » 树莓派点亮US1601S芯片的HYG1286494G屏幕

喜欢 (0)
发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
(1)个小伙伴在吐槽
  1. 膜拜大佬。完全没看明白写的啥...
    nice2019-06-05 21:36 回复