📄 实验8_思考_lcd.s43
字号:
#include "msp430x44x.h"
;******************************************************************************
; MSP-Test44x Demo - LCD Put "6543210" on STK/EVK LCD
;
; Description; Put "6543210" on MSP-EVK430S320 LCD.
; ACLK = LFXT1 = 32768, MCLK = SMCLK = DCO = 32xACLK = 1.048576MHz
; //*An external watch crystal is required on XIN/XOUT for ACLK*//
;
; MSP430F449
; -----------------
; /|\| XIN|-
; | | | 32kHz
; --|RST XOUT|-
; | |
; +-|R33 P5.1| -----------------
; 1m | - |--> | + 7 6 5 4 3 2 1 |
; +-|R23 P3.2| -----------------
; 1m | COM0|-----||||
; +-|R13 COM1|------|||
; 1m | COM2|-------||
; +-|R03 COM3|--------|
; | | |
; Vss
;
;------------------------------------------------------------------------------
ORG 01100h ; Program Start
;------------------------------------------------------------------------------
RESET mov.w #0A00h,SP ; Initialize '449 stackpointer
StopWDT mov.w #WDTPW+WDTHOLD,&WDTCTL ; Stop Watchdog Timer
SetupFLL bis.b #XCAP14PF,&FLL_CTL0 ; Configure load caps
SetupLCD mov.b #LCDON+LCD4MUX+LCDP2,&LCDCTL ; STK LCD 4Mux, S0-S17
SetupBT mov.b #BTFRFQ1,&BTCTL ; STK LCD freq.
SetupIO mov.b #0FCh,&P5SEL ; Common and Rxx all selected
;
Mainloop clr.w R5 ; Clear pointer
Disp mov.b LCD_Tab(R5),LCDMEM(R5) ;
inc.w R5 ;
cmp.w #07,R5 ;
jne Disp ;
jmp Mainloop ; Again
;
LCD_Tab DB 0B7h ; displays "0"
DB 012h ; displays "1"
DB 08Fh ; displays "2"
DB 01Fh ; displays "3"
DB 03Ah ; displays "4"
DB 03Dh ; displays "5"
DB 0BDh ; displays "6"
DB 013h ; displays "7"
DB 0BFh ; displays "8"
DB 03Fh ; displays "9"
;
;-----------------------------------------------------------------------------
; Interrupt Vectors Used MSP430F44x
;-----------------------------------------------------------------------------
ORG 0FFFEh ; MSP430 RESET Vector
DW RESET ;
END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -