当前位置:首页>新闻中心>公司动态>转【micropython】TPYboard控制LCD5110显示6x8字符

转【micropython】TPYboard控制LCD5110显示6x8字符

发布时间:2016-07-28 点击数:2615

原创版权归山东萝卜科技有限公司(http://www.micropython.net.cn)所有,转载必须以链接http://www.micropython.net.cn/support.php?id=206形式注明作者和原始出处。


    MicroPython的TPYBoard驱动LCD5110

    先看一下LCD5110针脚含义吧(注意:LCD5110的针脚有些不一样的)

    TPYBoard的针脚与5110的针脚对应关系如下:

    TPYBoard       LCD5110    memo

    ————————————————————————————

    # any   Pin        => RST       Reset pin (0=reset, 1=normal)

    # any   Pin        => CE        Chip Enable (0=listen for input,   1=ignore input)

    # any   Pin        => DC        Data/Command (0=commands, 1=data)

    #   MOSI          => DIN       data flow (Master out, Slave in)

    #   SCK           => CLK       SPI clock

    # 3V3   or any Pin  => VCC       3.3V logic voltage (0=off, 1=on)

    # any   Pin        => LIGHT     Light (0=on, 1=off)

    #   GND           => GND

    还是看不明白的话,直接上针脚编号吧

    TPYBoard       LCD5110    memo

    ————————————————————————————

    Y10        => RST       Reset pin (0=reset, 1=normal)

    Y11        => CE        Chip Enable (0=listen for input, 1=ignore input)

    Y9         => DC        Data/Command (0=commands, 1=data)

    X8         => DIN       data flow (Master out, Slave in)

    X6         => CLK       SPI clock

    VCC

    Y12        => LIGHT     Light (0=on, 1=off)

    GND

    接线ok后,可运行main.py了。

    main.py源代码:

注:文章转自http://www.micropython.net.cn

在线客服
  • 销售热线
    15664481982