⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bit1611b5_v023.asm

📁 Analog and digital LCD PANEL dirver code
💻 ASM
📖 第 1 页 / 共 5 页
字号:
; ******************************************************************************
;
;        Copyright (c) 2005-2006 Beyond Innovation Technology Co., Ltd
;
;        All rights are reserved. Reproduction in whole or in parts is
;   prohibited without the prior written consent of the copyright owner.
;  ----------------------------------------------------------------------
;
;   Module: BIT1611B5.ASM
;
;   Purpose: .
;
;   Version: 0.23                                   01:27PM  2006/08/17
;
;   Assembler: BiTEK Script MCU Assembler v1.22
;
;   Reference:
;   [1] BIT1611B Data Sheet Version 1.0, 2005-11-10,
;       Beyond Innovation Technology
;
;  ----------------------------------------------------------------------
;   Modification:
;
;   R001 07:00PM  2006/05/04 Jeffrey Chang
;   Reason:
;       1. Original.
;   Solution:
;
;  ----------------------------------------------------------------------
;   Modification:
;
;   V007 03:33PM  2006/05/11 Jeffrey Chang
;   Reason:
;       1. To disable SELECT key while MENU is ON.
;       2. To fix OSD Message bug.
;       3. To fix PWM adjustment range bug.
;   Solution:
;
;  ----------------------------------------------------------------------
;   Modification:
;
;   V009 10:39AM  2006/05/12 Jeffrey Chang
;   Reason:
;       1. To add <EXIT> menu item.
;   Solution:
;
;  ----------------------------------------------------------------------
;   Modification:
;
;   V011 10:47AM  2006/05/19 Jeffrey Chang
;   Reason:
;       1. To revise BCHS and PWM ranges.
;   Solution:
;
;  ----------------------------------------------------------------------
;   Modification:
;
;   V012 04:31PM  2006/05/23 Jeffrey Chang
;   Reason:
;       1. To add TCON modes feature by POWER key.
;   Solution:
;
;  ----------------------------------------------------------------------
;   Modification:
;
;   V013 06:50PM  2006/05/25 Jeffrey Chang
;   Reason:
;       1. To add IR control feature.
;   Solution:
;
;  ----------------------------------------------------------------------
;   Modification:
;
;   V014 05:13PM  2006/05/26 Jeffrey Chang
;   Reason:
;       1. To use Auto Color Standard detection mode 1 (R10D.7) for PAL-M/N.
;   Solution:
;
;  ----------------------------------------------------------------------
;   Modification:
;
;   V015 11:42AM  2006/05/30 Jeffrey Chang
;   Reason:
;       1. To fix IR MENU key problem.
;       2. To use RC03 remote control instead old one.
;       3. To support IR REPEAT code.
;   Solution:
;
;  ----------------------------------------------------------------------
;   Modification:
;
;   V016 07:50PM  2006/06/02 Jeffrey Chang
;   Reason:
;       1. To rename VP_DISPLAY_xxx to VP_SHOW_xxx.
;   Solution:
;
;  ----------------------------------------------------------------------
;   Modification:
;
;   V019 03:46PM  2006/06/13 Jeffrey Chang
;   Reason:
;       1. To revise WP and BL controls.
;   Solution:
;
;  ----------------------------------------------------------------------
;   Modification:
;
;   V020 08:29PM  2006/06/20 Jeffrey Chang
;   Reason:
;       1. To fix IR REPEAT key bug.
;       2. To re-arrange RAM map.
;   Solution:
;
;  ----------------------------------------------------------------------
;   Modification:
;
;   V022 01:31PM  2006/07/04 Lily Huang
;   Reason:
;       1. To revise INT_ATTR_LOAD_DISABLE, INT_ATTR_LOAD_ENABLE and 0x005 of table PORT_003_00A.
;   Solution:
;
;  ----------------------------------------------------------------------
;   Modification:
;
;   V023 01:28PM  2006/08/17 Jeffrey Chang
;   Reason:
;       1. To use BIT1611B ASM new feature.
;   Solution:
;
; ******************************************************************************

; //////////////////////////////////////////////////////////////////////////////
; Code:     BIT1611B5
; Platform: 04  - (04) BIT1611B5 Board
; Panel:    01  - (01) AUO A070FW03 7.0"    1440(W) x 234(H)
;
;   1) Video Source
;       CVBS1   at AIN11    PIN 2
;       CVBS2   at AIN21
;       Y       at AIN12    PIN 4
;       C       at AIN22    PIN 13
;
;   2) Backlight Control            at GPO3 (PIN 92): Active LOW
;       ON      = LOW
;       OFF     = HIGH or Tri-state
;
;   3) EEPROM Write Protect (WP)    at GPO0 (PIN 78): Active HIGH
;           ON  = Tri-state
;           OFF = LOW
;
;   4) Keypad
;       DOWN    = BIN3 PIN 55 (GPI3)  :   Active HIGH
;       UP      = BIN4 PIN 53 (GPI4)  :   Active HIGH
;       SELECT  = BIN5 PIN 52 (GPI5)  :   Active HIGH
;       MENU    = BIN6 PIN 51 (GPI6)  :   Active HIGH
;       PWR     = BIN7 PIN 50 (GPI7)  :   Active HIGH
;
;       PWM Menu: MENU + UP
;
;   5) VGHL
;       VGHL_PWM                    at PWM1 (PIN 127)
;
;   6) VCOM DC
;       VCOM_PWM                    at PWM2 (PIN 128)
;
;   7) IR
;       IR_UDCC     0x6E91      IR Custom Code
;       IR          C  /C D  /D
;       IR_DOWN     6E 91 19 FB     916E E619
;       IR_UP       6E 91 18 FD     916E E718
;       IR_SELECT   6E 91 59 EF     916E A659
;       IR_MENU     6E 91 58 FE     916E A758
;       IR_POWER    6E 91 14 F7     916E EB14
;
; //////////////////////////////////////////////////////////////////////////////


; ------------------------------------------------------------------------------
; BIT1611B Register Map
; ------------------------------------------------------------------------------

VP_003_INT_MASK                     EQU         0003h   ; [1]12 Interrupt Mask
VP_004_INT_ACK                      EQU         0004h   ; [1]13 Interrupt ACK
VP_005_INT_ATTR                     EQU         0005h   ; [1]13 Interrupt Attribute
VP_008_GPO_SEL                      EQU         0008h   ; [1]20 GPO Port Enable
VP_009_GPO_TYPE                     EQU         0009h   ; [1]20 GPO Port Type
VP_00A_GPO_REG                      EQU         000Ah   ; [1]20 GPO Value 0=Low Level, 1=High Level
VP_00B_SRST_ATTR1                   EQU         000Bh   ; [1]23 Software Reset
VP_00C_SRST_ATTR2                   EQU         000Ch   ; [1]23 Software Reset
VP_00E_CLK_ATTR1                    EQU         000Eh   ; [1]25
VP_026_SPECIAL_OUTPUT               EQU         0026h   ; [1]32
VP_037_TCON                         EQU         0037h
VP_040_TESTPATTERN_ATTR             EQU         0040h   ; [1]42

VP_056059_DISPLAY_H_START           EQU         0056h   ; [1]54 Display Window Horizontal Start Position
VP_05F_HSD1_MSB                     EQU         005Fh   ; [1]56 HSD

VP_07C_BRIGHTNESS_R                 EQU         007Ch   ; [1]63 R Brightness
VP_07D_BRIGHTNESS_R                 EQU         007Dh   ; [1]63 G Brightness
VP_07E_BRIGHTNESS_R                 EQU         007Eh   ; [1]63 B Brightness
VP_07F_CONTRAST_R                   EQU         007Fh   ; [1]63 R Contrast
VP_080_CONTRAST_R                   EQU         0080h   ; [1]63 G Contrast
VP_081_CONTRAST_R                   EQU         0081h   ; [1]63 B Contrast

VP_08B_IMAGE_ATTR                   EQU         008Bh   ; [1]67 Image Enhancement

VP_0A2_GAMMA_ATTR                   EQU         00A2h
VP_0A4_PLL_VND                      EQU         00A4h   ; [1]76 PLL N Value
VP_0BA_TIMER0_COUNT                 EQU         00BAh   ; Timer0 Count value
VP_0BB_TIMER0_ATTR                  EQU         00BBh   ; Timer0 Attribute
VP_0BC_TIMER1_COUNT                 EQU         00BCh   ; Timer1 Count value
VP_0BD_TIMER1_ATTR                  EQU         00BDh   ; Timer1 Attribute

VP_0C0_DB                           EQU         00C0h   ; [1]79
VP_0C1_KEY_ACK                      EQU         00C1h
VP_0C2_KEY_STATUS                   EQU         00C2h   ; [1]79 Real time GPI status
VP_0C4_KEY_TYPE_1234                EQU         00C4h   ; [1]79 GPI[4:1] Type setup
VP_0C5_KEY_TYPE_5678                EQU         00C5h
VP_0CC_SPI_ATTR                     EQU         00CCh

VP_0D6_P12_VSYNC                    EQU         00D6h

; PWM1
VP_0DE0E1_SYNC_DELAY                EQU         00DEh
VP_0DF0E1_PWM1_REF                  EQU         00DFh
VP_0E00E1_PWM1_FREQ                 EQU         00E0h
VP_0E1_PWM1_ATTR                    EQU         00E1h
VP_0E20E3_PWM1_DUTY                 EQU         00E2h
VP_0E3_PWM1_DUTY_MSB                EQU         00E3h

; PWM2
VP_0E40E7_PWM2_REF                  EQU         00E4h
VP_0E50E7_PWM2_FREQ                 EQU         00E5h
VP_0E6_PWM_SYNC_DELAY               EQU         00E6h
VP_0E7_PWM2_ATTR                    EQU         00E7h
VP_0E80E9_PWM2_DUTY                 EQU         00E8h
VP_0EA_PWM12_ATTR                   EQU         00EAh

; PWM4
VP_0ED_PWM4_FREQ                    EQU         00EDh
VP_0EE_PWM4_DUTY                    EQU         00EEh
VP_0EF_FB_LOW                       EQU         00EFh
VP_0F0_FB_HIGH                      EQU         00F0h
VP_0F1_PWM34_ATTR                   EQU         00F1h

; IR
VP_0F5_IR_DATA_BAR                  EQU         00F5h   ; [1]90 IR /Data
VP_0F6_IR_CODE_BAR                  EQU         00F6h   ; [1]90 IR /Code
VP_0F7_IR_DATA                      EQU         00F7h   ; [1]90 IR Data
VP_0F8_IR_CODE                      EQU         00F8h   ; [1]90 IR Code
VP_0F9_IR_UDCC_BAR                  EQU         00F9h   ; [1]90 User Defined Customer /Code
VP_0FA_IR_UDCC                      EQU         00FAh   ; [1]90 User Defined Customer Code
VP_0F90FA_IR_UDCC                   EQU         00F9h   ; [1]90 User Defined Customer Code
VP_0FB_IR_ATTR                      EQU         00FBh   ; [1]90 IR Attribute
VP_0FC_IR_ATTR2                     EQU         00FCh   ; [1]90 IR Attribute 2

; VD
VP_101_AFE_ATTR                     EQU         0101h
VP_102_DVP_ATTR                     EQU         0102h
VP_103_LUMA_PATH3                   EQU         0103h   ; [1]97 Luminance Process
VP_104_VD_MODE                      EQU         0104h   ; [1]96
VP_105_DVP_SHARPNESS                EQU         0105h   ; Sharpness
VP_106_DVP_BRIGHTNESS               EQU         0106h
VP_107_DVP_CONTRAST                 EQU         0107h
VP_109_DVP_SATURATION               EQU         0109h   ; Saturation
VP_10A_DVP_HUE                      EQU         010Ah   ; Hue
VP_10D_YDEL                         EQU         010Dh   ; [1]98

VP_129_AAGC_ATTR                    EQU         0129h
VP_12A_ACLAMP_LEVEL                 EQU         012Ah   ; [1]105 Analog Clamp Level
VP_136_AFE_CTRL                     EQU         0136h

VP_13813A_OSD1_H_POSITION           EQU         0138h
VP_143_OSD1_ATTR4                   EQU         0143h
VP_146151_OSD2_H_POSITION           EQU         0146h
VP_151_OSD2_ATTR4                   EQU         0151h
VP_154156_OSD3_H_POSITION           EQU         0154h
VP_15F_OSD3_ATTR4                   EQU         015Fh

VP_170_CSTD_CTRL                    EQU         0170h   ; [1]110
VP_171_CSTD_EN                      EQU         0171h   ; [1]111
VP_186_DVP_STATUS                   EQU         0186h   ; [1]112
VP_18A18B_SUB_PHASE                 EQU         018Ah   ; [1]113 Sub-Carrier Frequency Phase
VP_18C_DET_MODE                     EQU         018Ch

VP_0200_02FF_GAMMA_LUT_R            EQU         0200h
VP_0300_03FF_GAMMA_LUT_G            EQU         0300h
VP_0400_04FF_GAMMA_LUT_B            EQU         0400h


VP_0500_057F_DISPLAY_CODE           EQU         0500h
VP_0580_05FF_DISPLAY_ATTR           EQU         0580h
VP_0600_063F_PALETTE                EQU         0600h
VP_0700_07FF_USER_FONT_RAM          EQU         0700h

; =====================================
; Code
;   OSD1 (7  col x 1 row): 0x500..0x506
;   OSD2 (10 col x 7 row): 0x507..0x54C
;   OSD3 (27 col x 1 row): 0x54D..0x567
;       Left:   0x54D
;       Bar:    0x54E..0x562
;       Right:  0x563
;       CSTD:   0x564
;       D100:   0x565
;       D10:    0x566
;       D1:     0x567

; OSD1
OSD1_WIDTH                          EQU         7
OSD1_WIDTH_1                        EQU         6
OSD1_HEIGHT                         EQU         1
OSD1_HEIGHT_1                       EQU         0
OSD1_BASE                           EQU         000h    ; 500h + 00h = 500h
OSD1_AREA                           EQU         7
OSD1_AREA_1                         EQU         6

VP_SHOW_MESSAGE                     EQU         0500h

; ----------------------------------
; OSD2
OSD2_WIDTH                          EQU         10
OSD2_WIDTH_1                        EQU         9
OSD2_HEIGHT                         EQU         7
OSD2_HEIGHT_1                       EQU         6
OSD2_BASE                           EQU         007h    ; 500h + 07h = 507h
OSD2_AREA                           EQU         70      ; 10 x 7 = 70
OSD2_AREA_1                         EQU         69

VP_SHOW_OSD2                        EQU         0507h
VP_SHOW_OSD2_ROW0                   EQU         0507h
VP_SHOW_OSD2_ROW1                   EQU         0511h
VP_SHOW_OSD2_ROW2                   EQU         051Bh
VP_SHOW_OSD2_ROW3                   EQU         0525h
VP_SHOW_OSD2_ROW4                   EQU         052Fh
VP_SHOW_OSD2_ROW5                   EQU         0539h
VP_SHOW_OSD2_ROW6                   EQU         0543h

; ----------------------------------
; OSD3
OSD3_WIDTH                          EQU         27
OSD3_WIDTH_1                        EQU         26
OSD3_HEIGHT                         EQU         1
OSD3_HEIGHT_1                       EQU         0
OSD3_BASE                           EQU         04Dh    ; 507h + 70 = 54Dh
OSD3_AREA                           EQU         27
OSD3_AREA_1                         EQU         26
OSD3_BAR                            EQU         21      ; Including Left/Right
OSD3_BAR_1                          EQU         20
OSD3_DIGIT                          EQU         3       ; 3 digits
OSD3_DIGIT_1                        EQU         2

VP_SHOW_OSD3                        EQU         054Dh
VP_SHOW_BAR_LEFT                    EQU         054Dh   ; Left bracket
VP_SHOW_BAR                         EQU         054Eh   ; 54Eh..562h
VP_SHOW_EMPTY                       EQUL        VP_SHOW_BAR
VP_SHOW_BAR_LSB                     EQUL        VP_SHOW_BAR
VP_SHOW_BAR_RIGHT                   EQU         0563h   ; Right bracket

VP_SHOW_VERSION                     EQU         054Eh
VP_SHOW_CSTD                        EQU         0564h   ; NTSC/PAL

VP_SHOW_DIGIT                       EQU         0565h
VP_SHOW_DIGIT100                    EQU         0565h
VP_SHOW_DIGIT10                     EQU         0566h
VP_SHOW_DIGIT1                      EQU         0567h


VP_SHOW_CUE43                       EQU         0554h
VP_SHOW_CUE169                      EQU         055Bh

; =====================================
; Attribute
;   OSD1 (7  col x 1 row): 0x580..0x586

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -