📄 psocconfigtbl.lis
字号:
0000 ;----------------------------------------------------
0000 macro M8C_SetBank0
0000 and F, ~FLAG_XIO_MASK
0000 macro M8C_SetBank1
0000 or F, FLAG_XIO_MASK
0000 macro M8C_EnableGInt
0000 or F, FLAG_GLOBAL_IE
0000 macro M8C_DisableGInt
0000 and F, ~FLAG_GLOBAL_IE
0000 macro M8C_DisableIntMask
0000 and reg[@0], ~@1 ; disable specified interrupt enable bit
0000 macro M8C_EnableIntMask
0000 or reg[@0], @1 ; enable specified interrupt enable bit
0000 macro M8C_ClearIntFlag
0000 and reg[@0], ~@1 ; clear specified interrupt enable bit
0000 macro M8C_EnableWatchDog
0000 and reg[CPU_SCR0], ~CPU_SCR0_PORS_MASK
0000 macro M8C_ClearWDT
0000 mov reg[RES_WDT], 00h
0000 macro M8C_ClearWDTAndSleep
0000 mov reg[RES_WDT], 38h
0000 macro M8C_Stall
0000 or reg[ASY_CR], ASY_CR_SYNCEN
0000 macro M8C_Unstall
0000 and reg[ASY_CR], ~ASY_CR_SYNCEN
0000 macro M8C_Sleep
0000 or reg[CPU_SCR0], CPU_SCR0_SLEEP_MASK
0000 ; The next instruction to be executed depends on the state of the
0000 ; various interrupt enable bits. If some interrupts are enabled
0000 ; and the global interrupts are disabled, the next instruction will
0000 ; be the one that follows the invocation of this macro. If global
0000 ; interrupts are also enabled then the next instruction will be
0000 ; from the interrupt vector table. If no interrupts are enabled
0000 ; then the CPU sleeps forever.
0000 macro M8C_Stop
0000 ; In general, you probably don't want to do this, but here's how:
0000 or reg[CPU_SCR0], CPU_SCR0_STOP_MASK
0000 ; Next instruction to be executed is located in the interrupt
0000 ; vector table entry for Power-On Reset.
0000 macro M8C_Reset
0000 ; Restore CPU to the power-on reset state.
0000 mov A, 0
0000 SSC
0000 ; Next non-supervisor instruction will be at interrupt vector 0.
0000 macro Suspend_CodeCompressor
0000 or F, 0
0000 macro Resume_CodeCompressor
0000 add SP, 0
export LoadConfigTBL_lcd122x32_Bank1
export LoadConfigTBL_lcd122x32_Bank0
export LoadConfigTBL_lcd122x32_Ordered
AREA lit(rom, rel)
0000 LoadConfigTBL_lcd122x32_Ordered:
0000 ; Ordered Global Register values
0000 7110 or F, FLAG_XIO_MASK
0002 620080 mov reg[00h], 80h ; Port_0_DriveMode_0 register (PRT0DM0)
0005 62017F mov reg[01h], 7fh ; Port_0_DriveMode_1 register (PRT0DM1)
0008 70EF and F, ~FLAG_XIO_MASK
000A 62037F mov reg[03h], 7fh ; Port_0_DriveMode_2 register (PRT0DM2)
000D 620280 mov reg[02h], 80h ; Port_0_GlobalSelect register (PRT0GS)
0010 7110 or F, FLAG_XIO_MASK
0012 620200 mov reg[02h], 00h ; Port_0_IntCtrl_0 register (PRT0IC0)
0015 620300 mov reg[03h], 00h ; Port_0_IntCtrl_1 register (PRT0IC1)
0018 70EF and F, ~FLAG_XIO_MASK
001A 620100 mov reg[01h], 00h ; Port_0_IntEn register (PRT0IE)
001D 7110 or F, FLAG_XIO_MASK
001F 620400 mov reg[04h], 00h ; Port_1_DriveMode_0 register (PRT1DM0)
0022 6205DF mov reg[05h], dfh ; Port_1_DriveMode_1 register (PRT1DM1)
0025 70EF and F, ~FLAG_XIO_MASK
0027 6207DF mov reg[07h], dfh ; Port_1_DriveMode_2 register (PRT1DM2)
002A 620620 mov reg[06h], 20h ; Port_1_GlobalSelect register (PRT1GS)
002D 7110 or F, FLAG_XIO_MASK
002F 620600 mov reg[06h], 00h ; Port_1_IntCtrl_0 register (PRT1IC0)
0032 620700 mov reg[07h], 00h ; Port_1_IntCtrl_1 register (PRT1IC1)
0035 70EF and F, ~FLAG_XIO_MASK
0037 620500 mov reg[05h], 00h ; Port_1_IntEn register (PRT1IE)
003A 7110 or F, FLAG_XIO_MASK
003C 620800 mov reg[08h], 00h ; Port_2_DriveMode_0 register (PRT2DM0)
003F 6209FF mov reg[09h], ffh ; Port_2_DriveMode_1 register (PRT2DM1)
0042 70EF and F, ~FLAG_XIO_MASK
0044 620BFF mov reg[0bh], ffh ; Port_2_DriveMode_2 register (PRT2DM2)
0047 620A00 mov reg[0ah], 00h ; Port_2_GlobalSelect register (PRT2GS)
004A 7110 or F, FLAG_XIO_MASK
004C 620A00 mov reg[0ah], 00h ; Port_2_IntCtrl_0 register (PRT2IC0)
004F 620B00 mov reg[0bh], 00h ; Port_2_IntCtrl_1 register (PRT2IC1)
0052 70EF and F, ~FLAG_XIO_MASK
0054 620900 mov reg[09h], 00h ; Port_2_IntEn register (PRT2IE)
0057 7110 or F, FLAG_XIO_MASK
0059 620C00 mov reg[0ch], 00h ; Port_3_DriveMode_0 register (PRT3DM0)
005C 620D00 mov reg[0dh], 00h ; Port_3_DriveMode_1 register (PRT3DM1)
005F 70EF and F, ~FLAG_XIO_MASK
0061 620F00 mov reg[0fh], 00h ; Port_3_DriveMode_2 register (PRT3DM2)
0064 620E00 mov reg[0eh], 00h ; Port_3_GlobalSelect register (PRT3GS)
0067 7110 or F, FLAG_XIO_MASK
0069 620E00 mov reg[0eh], 00h ; Port_3_IntCtrl_0 register (PRT3IC0)
006C 620F00 mov reg[0fh], 00h ; Port_3_IntCtrl_1 register (PRT3IC1)
006F 70EF and F, ~FLAG_XIO_MASK
0071 620D00 mov reg[0dh], 00h ; Port_3_IntEn register (PRT3IE)
0074 7110 or F, FLAG_XIO_MASK
0076 621000 mov reg[10h], 00h ; Port_4_DriveMode_0 register (PRT4DM0)
0079 621100 mov reg[11h], 00h ; Port_4_DriveMode_1 register (PRT4DM1)
007C 70EF and F, ~FLAG_XIO_MASK
007E 621300 mov reg[13h], 00h ; Port_4_DriveMode_2 register (PRT4DM2)
0081 621200 mov reg[12h], 00h ; Port_4_GlobalSelect register (PRT4GS)
0084 7110 or F, FLAG_XIO_MASK
0086 621200 mov reg[12h], 00h ; Port_4_IntCtrl_0 register (PRT4IC0)
0089 621300 mov reg[13h], 00h ; Port_4_IntCtrl_1 register (PRT4IC1)
008C 70EF and F, ~FLAG_XIO_MASK
008E 621100 mov reg[11h], 00h ; Port_4_IntEn register (PRT4IE)
0091 7110 or F, FLAG_XIO_MASK
0093 621400 mov reg[14h], 00h ; Port_5_DriveMode_0 register (PRT5DM0)
0096 621500 mov reg[15h], 00h ; Port_5_DriveMode_1 register (PRT5DM1)
0099 70EF and F, ~FLAG_XIO_MASK
009B 621700 mov reg[17h], 00h ; Port_5_DriveMode_2 register (PRT5DM2)
009E 621600 mov reg[16h], 00h ; Port_5_GlobalSelect register (PRT5GS)
00A1 7110 or F, FLAG_XIO_MASK
00A3 621600 mov reg[16h], 00h ; Port_5_IntCtrl_0 register (PRT5IC0)
00A6 621700 mov reg[17h], 00h ; Port_5_IntCtrl_1 register (PRT5IC1)
00A9 70EF and F, ~FLAG_XIO_MASK
00AB 621500 mov reg[15h], 00h ; Port_5_IntEn register (PRT5IE)
00AE 7F ret
00AF LoadConfigTBL_lcd122x32_Bank0:
00AF ; Global Register values
00AF 6028 db 60h, 28h ; AnalogColumnInputSelect register (AMX_IN)
00B1 6600 db 66h, 00h ; AnalogComparatorControl1 register (CMP_CR1)
00B3 6305 db 63h, 05h ; AnalogReferenceControl register (ARF_CR)
00B5 6500 db 65h, 00h ; AnalogSyncControl register (ASY_CR)
00B7 E600 db e6h, 00h ; DecimatorControl_0 register (DEC_CR0)
00B9 E700 db e7h, 00h ; DecimatorControl_1 register (DEC_CR1)
00BB D600 db d6h, 00h ; I2CConfig register (I2CCFG)
00BD B000 db b0h, 00h ; Row_0_InputMux register (RDI0RI)
00BF B100 db b1h, 00h ; Row_0_InputSync register (RDI0SYN)
00C1 B200 db b2h, 00h ; Row_0_LogicInputAMux register (RDI0IS)
00C3 B333 db b3h, 33h ; Row_0_LogicSelect_0 register (RDI0LT0)
00C5 B433 db b4h, 33h ; Row_0_LogicSelect_1 register (RDI0LT1)
00C7 B580 db b5h, 80h ; Row_0_OutputDrive_0 register (RDI0SRO0)
00C9 B620 db b6h, 20h ; Row_0_OutputDrive_1 register (RDI0SRO1)
00CB B855 db b8h, 55h ; Row_1_InputMux register (RDI1RI)
00CD B900 db b9h, 00h ; Row_1_InputSync register (RDI1SYN)
00CF BA10 db bah, 10h ; Row_1_LogicInputAMux register (RDI1IS)
00D1 BB33 db bbh, 33h ; Row_1_LogicSelect_0 register (RDI1LT0)
00D3 BC33 db bch, 33h ; Row_1_LogicSelect_1 register (RDI1LT1)
00D5 BD00 db bdh, 00h ; Row_1_OutputDrive_0 register (RDI1SRO0)
00D7 BE00 db beh, 00h ; Row_1_OutputDrive_1 register (RDI1SRO1)
00D9 ; Instance name PWM8_1, User Module PWM8
00D9 ; Instance name PWM8_1, Block Name PWM8(DBB00)
00D9 2300 db 23h, 00h ;PWM8_1_CONTROL_REG(DBB00CR0)
00DB 2110 db 21h, 10h ;PWM8_1_PERIOD_REG(DBB00DR1)
00DD 2208 db 22h, 08h ;PWM8_1_COMPARE_REG(DBB00DR2)
00DF ; Instance name PWM8_2, User Module PWM8
00DF ; Instance name PWM8_2, Block Name PWM8(DBB01)
00DF 2700 db 27h, 00h ;PWM8_2_CONTROL_REG(DBB01CR0)
00E1 2564 db 25h, 64h ;PWM8_2_PERIOD_REG(DBB01DR1)
00E3 2614 db 26h, 14h ;PWM8_2_COMPARE_REG(DBB01DR2)
00E5 FF db ffh
00E6 LoadConfigTBL_lcd122x32_Bank1:
00E6 ; Global Register values
00E6 6100 db 61h, 00h ; AnalogClockSelect1 register (CLK_CR1)
00E8 6900 db 69h, 00h ; AnalogClockSelect2 register (CLK_CR2)
00EA 6000 db 60h, 00h ; AnalogColumnClockSelect register (CLK_CR0)
00EC 6200 db 62h, 00h ; AnalogIOControl_0 register (ABF_CR0)
00EE 6733 db 67h, 33h ; AnalogLUTControl0 register (ALT_CR0)
00F0 6833 db 68h, 33h ; AnalogLUTControl1 register (ALT_CR1)
00F2 6300 db 63h, 00h ; AnalogModulatorControl_0 register (AMD_CR0)
00F4 6600 db 66h, 00h ; AnalogModulatorControl_1 register (AMD_CR1)
00F6 D100 db d1h, 00h ; GlobalDigitalInterconnect_Drive_Even_Input register (GDI_E_IN)
00F8 D300 db d3h, 00h ; GlobalDigitalInterconnect_Drive_Even_Output register (GDI_E_OU)
00FA D000 db d0h, 00h ; GlobalDigitalInterconnect_Drive_Odd_Input register (GDI_O_IN)
00FC D200 db d2h, 00h ; GlobalDigitalInterconnect_Drive_Odd_Output register (GDI_O_OU)
00FE E11C db e1h, 1ch ; OscillatorControl_1 register (OSC_CR1)
0100 E200 db e2h, 00h ; OscillatorControl_2 register (OSC_CR2)
0102 DF00 db dfh, 00h ; OscillatorControl_3 register (OSC_CR3)
0104 DE00 db deh, 00h ; OscillatorControl_4 register (OSC_CR4)
0106 DD00 db ddh, 00h ; OscillatorGlobalBusEnableControl register (OSC_GO_EN)
0108 ; Instance name PWM8_1, User Module PWM8
0108 ; Instance name PWM8_1, Block Name PWM8(DBB00)
0108 2021 db 20h, 21h ;PWM8_1_FUNC_REG(DBB00FN)
010A 2117 db 21h, 17h ;PWM8_1_INPUT_REG(DBB00IN)
010C 2205 db 22h, 05h ;PWM8_1_OUTPUT_REG(DBB00OU)
010E ; Instance name PWM8_2, User Module PWM8
010E ; Instance name PWM8_2, Block Name PWM8(DBB01)
010E 2421 db 24h, 21h ;PWM8_2_FUNC_REG(DBB01FN)
0110 2516 db 25h, 16h ;PWM8_2_INPUT_REG(DBB01IN)
0112 2607 db 26h, 07h ;PWM8_2_OUTPUT_REG(DBB01OU)
0114 FF db ffh
0115
0115
0115 ; PSoC Configuration file trailer PsocConfig.asm
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -