查看: 4139|回复: 0

LL16.H库中LCD寄存器之一、LCD使能寄存器

[复制链接]
  • TA的每日心情
    难过
    2021-12-15 16:01
  • 签到天数: 1 天

    连续签到: 1 天

    [LV.1]初来乍到

    305

    主题

    4701

    帖子

    0

    中级会员

    Rank: 3Rank: 3

    积分
    377
    最后登录
    2023-8-16
    发表于 2010-5-11 14:18:01 | 显示全部楼层 |阅读模式
     一、LCDPEN:LCD使能寄存器 
    PEN[31:0]:LCD引脚使能。
       0:LCDn上的LCD操作关闭;
       1:LCDn上的LCD操作激活。
         这些位是用来设置LCD引脚功能的开启,在初始化LCD时,必须要开启LCD功能,否则LCD功能不能使用。
    二、LCDBPEN:LCD底板使能寄存器(背板使能控制寄存器)
     BPEN[28:0]:底板使能。
        0:LCDn上的前板操作激活;
        1:LCDn上的底板操作激活。



    附录1、LCD使能控制寄存器0在LL16.H中的定义。
    /*** LCDPEN0 - LCD Pin Enable Register 0; 0x00000880 ***/
    typedef union {
      byte Byte;
      struct {
        byte PEN0        :1;                                       /* Enable LCD pin 0 for LCD operation */
        byte PEN1        :1;                                       /* Enable LCD pin 1 for LCD operation */
        byte PEN2        :1;                                       /* Enable LCD pin 2 for LCD operation */
        byte PEN3        :1;                                       /* Enable LCD pin 3 for LCD operation */
        byte PEN4        :1;                                       /* Enable LCD pin 4 for LCD operation */
        byte PEN5        :1;                                       /* Enable LCD pin 5 for LCD operation */
        byte PEN6        :1;                                       /* Enable LCD pin 6 for LCD operation */
        byte PEN7        :1;                                       /* Enable LCD pin 7 for LCD operation */
      } Bits;
    } LCDPEN0STR;
    extern volatile LCDPEN0STR _LCDPEN0 @0x00000880;
    #define LCDPEN0                         _LCDPEN0.Byte
    #define LCDPEN0_PEN0                    _LCDPEN0.Bits.PEN0
    #define LCDPEN0_PEN1                    _LCDPEN0.Bits.PEN1
    #define LCDPEN0_PEN2                    _LCDPEN0.Bits.PEN2
    #define LCDPEN0_PEN3                    _LCDPEN0.Bits.PEN3
    #define LCDPEN0_PEN4                    _LCDPEN0.Bits.PEN4
    #define LCDPEN0_PEN5                    _LCDPEN0.Bits.PEN5
    #define LCDPEN0_PEN6                    _LCDPEN0.Bits.PEN6
    #define LCDPEN0_PEN7                    _LCDPEN0.Bits.PEN7
    /* LCDPEN_ARR: Access 4 LCDPENx registers in an array */
    #define LCDPEN_ARR                      ((volatile byte * __far) &LCDPEN0)
    #define LCDPEN0_PEN0_MASK               1
    #define LCDPEN0_PEN1_MASK               2
    #define LCDPEN0_PEN2_MASK               4
    #define LCDPEN0_PEN3_MASK               8
    #define LCDPEN0_PEN4_MASK               16
    #define LCDPEN0_PEN5_MASK               32
    #define LCDPEN0_PEN6_MASK               64
    #define LCDPEN0_PEN7_MASK               128
    附录2、LCD底板使能寄存器在LL16.H中的定义。
    /*** LCDBPEN0 - LCD Backplane Enable Register 0; 0x00000888 ***/
    typedef union {
      byte Byte;
      struct {
        byte BPEN0       :1;                                       /* Enable LCD pin 0 to operate as an LCD backplane or an LCD frontplane */
        byte BPEN1       :1;                                       /* Enable LCD pin 1 to operate as an LCD backplane or an LCD frontplane */
        byte BPEN2       :1;                                       /* Enable LCD pin 2 to operate as an LCD backplane or an LCD frontplane */
        byte BPEN3       :1;                                       /* Enable LCD pin 3 to operate as an LCD backplane or an LCD frontplane */
        byte BPEN4       :1;                                       /* Enable LCD pin 4 to operate as an LCD backplane or an LCD frontplane */
        byte BPEN5       :1;                                       /* Enable LCD pin 5 to operate as an LCD backplane or an LCD frontplane */
        byte BPEN6       :1;                                       /* Enable LCD pin 6 to operate as an LCD backplane or an LCD frontplane */
        byte BPEN7       :1;                                       /* Enable LCD pin 7 to operate as an LCD backplane or an LCD frontplane */
      } Bits;
    } LCDBPEN0STR;
    extern volatile LCDBPEN0STR _LCDBPEN0 @0x00000888;
    #define LCDBPEN0                        _LCDBPEN0.Byte
    #define LCDBPEN0_BPEN0                  _LCDBPEN0.Bits.BPEN0
    #define LCDBPEN0_BPEN1                  _LCDBPEN0.Bits.BPEN1
    #define LCDBPEN0_BPEN2                  _LCDBPEN0.Bits.BPEN2
    #define LCDBPEN0_BPEN3                  _LCDBPEN0.Bits.BPEN3
    #define LCDBPEN0_BPEN4                  _LCDBPEN0.Bits.BPEN4
    #define LCDBPEN0_BPEN5                  _LCDBPEN0.Bits.BPEN5
    #define LCDBPEN0_BPEN6                  _LCDBPEN0.Bits.BPEN6
    #define LCDBPEN0_BPEN7                  _LCDBPEN0.Bits.BPEN7
    /* LCDBPEN_ARR: Access 4 LCDBPENx registers in an array */
    #define LCDBPEN_ARR                     ((volatile byte * __far) &LCDBPEN0)
    #define LCDBPEN0_BPEN0_MASK             1
    #define LCDBPEN0_BPEN1_MASK             2
    #define LCDBPEN0_BPEN2_MASK             4
    #define LCDBPEN0_BPEN3_MASK             8
    #define LCDBPEN0_BPEN4_MASK             16
    #define LCDBPEN0_BPEN5_MASK             32
    #define LCDBPEN0_BPEN6_MASK             64
    #define LCDBPEN0_BPEN7_MASK             128
    该会员没有填写今日想说内容.
    回复

    使用道具 举报

    您需要登录后才可以回帖 注册/登录

    本版积分规则

    关闭

    站长推荐上一条 /3 下一条

    Archiver|手机版|小黑屋|恩智浦技术社区

    GMT+8, 2025-7-18 12:43 , Processed in 0.078262 second(s), 19 queries , MemCache On.

    Powered by Discuz! X3.4

    Copyright © 2001-2024, Tencent Cloud.

    快速回复 返回顶部 返回列表