コード例 #1
0
ファイル: epd7in5b.py プロジェクト: vincentjanv/waveshare
 def init(self):
     if (epdif.epd_init() != 0):
         return -1
     self.reset()
     self.send_command(POWER_SETTING)
     self.send_data(0x37)
     self.send_data(0x00)
     self.send_command(PANEL_SETTING)
     self.send_data(0xCF)
     self.send_data(0x08)
     self.send_command(BOOSTER_SOFT_START)
     self.send_data(0xc7)
     self.send_data(0xcc)
     self.send_data(0x28)
     self.send_command(POWER_ON)
     self.wait_until_idle()
     self.send_command(PLL_CONTROL)
     self.send_data(0x3c)
     self.send_command(TEMPERATURE_CALIBRATION)
     self.send_data(0x00)
     self.send_command(VCOM_AND_DATA_INTERVAL_SETTING)
     self.send_data(0x77)
     self.send_command(TCON_SETTING)
     self.send_data(0x22)
     self.send_command(TCON_RESOLUTION)
     self.send_data(0x02)  #source 640
     self.send_data(0x80)
     self.send_data(0x01)  #gate 384
     self.send_data(0x80)
     self.send_command(VCM_DC_SETTING)
     self.send_data(0x1E)  #decide by LUT file
     self.send_command(0xe5)  #FLASH MODE
     self.send_data(0x03)
コード例 #2
0
ファイル: epd1in54c.py プロジェクト: madvay/inktroller
    def init(self):
        if (epdif.epd_init() != 0):
            return -1
        self.reset()
        self.send_command(POWER_SETTING) 
        self.send_data(0x07)
        self.send_data(0x00)
        self.send_data(0x08)
        self.send_data(0x00)
        self.send_command(BOOSTER_SOFT_START)
        self.send_data(0x17)
        self.send_data(0x17)
        self.send_data(0x17)
        self.send_command(POWER_ON)

        self.wait_until_idle()

        self.send_command(PANEL_SETTING)
        self.send_data(0x0F)
        self.send_data(0x0D)
        self.send_command(VCOM_AND_DATA_INTERVAL_SETTING)
        self.send_data(0x77)
        self.send_command(PLL_CONTROL)
        self.send_data(0x39)
        self.send_command(TCON_RESOLUTION)
        self.send_data(0x98)
        self.send_data(0x00)
        self.send_data(0x98)
        self.send_command(VCM_DC_SETTING_REGISTER)
        self.send_data(0x0E)

        self.set_lut_bw()
        self.set_lut_red()
        return 0
コード例 #3
0
 def init(self, lut):
     if (epdif.epd_init() != 0):
         return -1
     # EPD hardware init start
     self.lut = lut
     self.reset()
     self.send_command(DRIVER_OUTPUT_CONTROL)
     self.send_data((EPD_HEIGHT - 1) & 0xFF)
     self.send_data(((EPD_HEIGHT - 1) >> 8) & 0xFF)
     self.send_data(0x00)  # GD = 0 SM = 0 TB = 0
     self.send_command(BOOSTER_SOFT_START_CONTROL)
     self.send_data(0xD7)
     self.send_data(0xD6)
     self.send_data(0x9D)
     self.send_command(WRITE_VCOM_REGISTER)
     self.send_data(0xA8)  # VCOM 7C
     self.send_command(SET_DUMMY_LINE_PERIOD)
     self.send_data(0x1A)  # 4 dummy lines per gate
     self.send_command(SET_GATE_TIME)
     self.send_data(0x08)  # 2us per line
     self.send_command(DATA_ENTRY_MODE_SETTING)
     self.send_data(0x03)  # X increment Y increment
     self.set_lut(self.lut)
     # EPD hardware init end
     return 0
コード例 #4
0
    def init(self):
        if (epdif.epd_init() != 0):
            return -1
        self.reset()
        self.send_command(POWER_SETTING)
        self.send_data(0x03)  # VDS_EN, VDG_EN
        self.send_data(0x00)  # VCOM_HV, VGHL_LV[1], VGHL_LV[0]
        self.send_data(0x2b)  # VDH
        self.send_data(0x2b)  # VDL
        self.send_data(0xff)  # VDHR
        self.send_command(BOOSTER_SOFT_START)
        self.send_data(0x17)
        self.send_data(0x17)
        self.send_data(0x17)  #07 0f 17 1f 27 2F 37 2f
        self.send_command(POWER_ON)
        self.wait_until_idle()
        self.send_command(PANEL_SETTING)
        #self.send_data(0xbf)    # KW-BF   KWR-AF  BWROTP 0f
        #self.send_data(0x0b)
        self.send_data(0x3F)
        # 300x400 B/W mode, LUT set by register

        self.send_command(PLL_CONTROL)
        self.send_data(0x3c)  # 3A 100HZ   29 150Hz 39 200HZ  31 171HZ
        return 0
コード例 #5
0
ファイル: epd4in2b.py プロジェクト: markfinn/pool-control
 def init(self):
     if (epdif.epd_init(self.spiport) != 0):
         return -1
     self.reset()
     self.send_command(POWER_SETTING)
     self.send_data(0x03)  #VDS_EN, VDG_EN
     self.send_data(0x00)  #VCOM_HV, VGHL_LV[1], VGHL_LV[0]
     self.send_data(0x2b)  #VDH
     self.send_data(0x2b)  #VDL
     self.send_data(0xff)  #VDHR
     self.send_command(BOOSTER_SOFT_START)
     self.send_data(0x17)
     self.send_data(0x17)
     self.send_data(0x17)  # 07 0f 17 1f 27 2F 37 2f
     self.send_command(POWER_ON)
     self.wait_until_idle()
     self.send_command(PANEL_SETTING)
     #        self.send_data(0x0F)        # 300x400 red LUT from OTP
     #        self.send_data(0x1F)        # 300x400 BW LUT from OTP
     #        self.send_data(0x2F)        # 300x400 red LUT from REGISTER
     self.send_data(0x3F)  # 300x400 BW LUT from REGISTER
     self.send_command(PLL_CONTROL)
     self.send_data(
         0x3c
     )  # 3A 100Hz   29 150Hz   39 200Hz    31 171Hz       3C 50Hz (default)    0B 10Hz
     self.send_command(VCOM_AND_DATA_INTERVAL_SETTING)
     self.send_data(0x37)  # floating border
     self.lut_setup(0)
コード例 #6
0
ファイル: epd2in7.py プロジェクト: fraserk9/ereader
    def init(self):
        if (epdif.epd_init() != 0):
            return -1
        # EPD hardware init start
        self.reset()
        self.send_command(POWER_SETTING)
        self.send_data(0x03)  # VDS_EN, VDG_EN
        self.send_data(0x00)  # VCOM_HV, VGHL_LV[1], VGHL_LV[0]
        self.send_data(0x2b)  # VDH
        self.send_data(0x2b)  # VDL
        self.send_data(0x09)  # VDHR
        self.send_command(BOOSTER_SOFT_START)
        self.send_data(0x07)
        self.send_data(0x07)
        self.send_data(0x17)
        # Power optimization
        self.send_command(0xF8)
        self.send_data(0x60)
        self.send_data(0xA5)
        # Power optimization
        self.send_command(0xF8)
        self.send_data(0x89)
        self.send_data(0xA5)
        # Power optimization
        self.send_command(0xF8)
        self.send_data(0x90)
        self.send_data(0x00)
        # Power optimization
        self.send_command(0xF8)
        self.send_data(0x93)
        self.send_data(0x2A)
        # Power optimization
        self.send_command(0xF8)
        self.send_data(0xA0)
        self.send_data(0xA5)
        # Power optimization
        self.send_command(0xF8)
        self.send_data(0xA1)
        self.send_data(0x00)
        # Power optimization
        self.send_command(0xF8)
        self.send_data(0x73)
        self.send_data(0x41)
        self.send_command(PARTIAL_DISPLAY_REFRESH)
        self.send_data(0x00)
        self.send_command(POWER_ON)
        self.wait_until_idle()

        self.send_command(PANEL_SETTING)
        self.send_data(0xAF)  # KW-BF   KWR-AF    BWROTP 0f
        self.send_command(PLL_CONTROL)
        self.send_data(0x3A)  # 3A 100HZ   29 150Hz 39 200HZ    31 171HZ
        self.send_command(VCM_DC_SETTING_REGISTER)
        self.send_data(0x12)
        self.delay_ms(2)
        self.set_lut()
        # EPD hardware init end
        return 0
コード例 #7
0
ファイル: epd4in2b.py プロジェクト: Larsene/Waveshare42B
 def init(self):
     if (epdif.epd_init() != 0):
         return -1
     self.reset()
     self.send_command(BOOSTER_SOFT_START)
     self.send_data(0x17)
     self.send_data(0x17)
     self.send_data(0x17)  # 07 0f 17 1f 27 2F 37 2f
     self.send_command(POWER_ON)
     self.wait_until_idle()
     self.send_command(PANEL_SETTING)
     self.send_data(0x0F)  # LUT from OTP
コード例 #8
0
 def init(self):
     if (epdif.epd_init() != 0):
         return -1
     self.reset()
     self.send_command(BOOSTER_SOFT_START)
     self.send_data (0x17)
     self.send_data (0x17)
     self.send_data (0x17)
     self.send_command(POWER_ON)
     self.wait_until_idle()
     self.send_command(PANEL_SETTING)
     self.send_data(0x8F)
     self.send_command(VCOM_AND_DATA_INTERVAL_SETTING)
     self.send_data(0x37)
     self.send_command(RESOLUTION_SETTING)
     self.send_data (0x68)
     self.send_data (0x00)
     self.send_data (0xD4)
コード例 #9
0
 def init(self):
     if (epdif.epd_init() != 0):
         return -1
     self.reset()
     self.send_command(BOOSTER_SOFT_START)
     self.send_data (0x17)
     self.send_data (0x17)
     self.send_data (0x17)
     self.send_command(POWER_ON)
     self.wait_until_idle()
     self.send_command(PANEL_SETTING)
     self.send_data(0x8F)
     self.send_command(VCOM_AND_DATA_INTERVAL_SETTING)
     self.send_data(0x77)
     self.send_command(TCON_RESOLUTION)
     self.send_data (0x80)
     self.send_data (0x01)
     self.send_data (0x28)
     self.send_command(VCM_DC_SETTING_REGISTER)
     self.send_data (0x0A)
コード例 #10
0
 def init(self):
     if (epdif.epd_init() != 0):
         print("Failed to init e-Paper device")
         return -1
     print("Initializing e-Paper device ...")
     self.send_command(POWER_OFF)
     self.reset()
     self.send_command(BOOSTER_SOFT_START)
     self.send_data (0x17)
     self.send_data (0x17)
     self.send_data (0x17)
     self.send_command(POWER_ON)
     self.wait_until_idle()
     self.send_command(PANEL_SETTING)
     self.send_data(0x8F)
     self.send_command(VCOM_AND_DATA_INTERVAL_SETTING)
     self.send_data(0x37)
     self.send_command(RESOLUTION_SETTING)
     self.send_data (0x68)
     self.send_data (0x00)
     self.send_data (0xD4)
     print("Init Complete ...")
コード例 #11
0
ファイル: fepd2in13.py プロジェクト: sbelectronics/sketch
    def Init(self):
        if (epdif.epd_init() != 0):
            return -1
        self.Reset()

        self.SendCommand(0x01)  #POWER SETTING
        self.SendData(0x03)
        self.SendData(0x00)
        self.SendData(0x2b)
        self.SendData(0x2b)
        self.SendData(0x03)

        self.SendCommand(0x06)  #boost soft start
        self.SendData(0x17)  #A
        self.SendData(0x17)  #B
        self.SendData(0x17)  #C

        self.SendCommand(0x04)
        # self.WaitUntilIdle()

        self.SendCommand(0x00)  #panel setting
        self.SendData(0xbf)  # LUT from OTP,128x296
        self.SendData(0x0d)  #VCOM to 0V fast

        self.SendCommand(0x30)  #PLL setting
        self.SendData(0x3a)  # 3a 100HZ   29 150Hz 39 200HZ	31 171HZ

        self.SendCommand(0x61)  #resolution setting
        self.SendData(WIDTH)
        self.SendData((HEIGHT >> 8) & 0xff)
        self.SendData(HEIGHT & 0xff)

        self.SendCommand(0x82)  #vcom_DC setting
        self.SendData(0x28)

        # self.SendCommand(0X50)			#VCOM AND DATA INTERVAL SETTING
        # self.SendData(0xb7)		#WBmode:VBDF 17|D7 VBDW 97 VBDB 57		WBRmode:VBDF F7 VBDW 77 VBDB 37  VBDR B7
        return 0
コード例 #12
0
ファイル: epd7in5b.py プロジェクト: KitchenTool/raspberrypi
 def init_quick(self):
     if (epdif.epd_init() != 0):
         return -1
     self.reset()
     self.send_command(POWER_SETTING)
     self.send_data(0x37)
     self.send_data(0x00)
     self.send_command(PANEL_SETTING)
     self.send_data(0xCF)
     self.send_data(0x08)
     self.send_command(BOOSTER_SOFT_START)
     self.send_data(0xc7)
     self.send_data(0xcc)
     self.send_data(0x28)
     self.send_command(POWER_ON)
     self.wait_until_idle()
     self.send(0x65, 0x01)
     self.send(0xb9)
     self.send(0x65, 0x00)
     self.send(0x00, 0xcf, 0x80)
     self.send(0x30, 0x3a)
     self.send(0x61, 0x02, 0x80, 0x01, 0x80)
     self.send(0x82, 0x1e)
     self.send(0x50, 0x17, 0x22)