📄 fet440_lcd_01.s43
字号:
;******************************************************************************
; MSP-FET430P440 Demo - LCD, Display "6543210" on STK/EVK LCD
;
; Description: Display "6543210" on MSP-EVK430S320 LCD.
; ACLK = LFXT1 = 32768Hz, MCLK = SMCLK = default DCO = 32 x ACLK = 1048576Hz
; //* An external watch crystal between XIN & XOUT is required 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
;
; M. Buccini
; Texas Instruments Inc.
; Feb 2005
; Built with IAR Embedded Workbench Version: 3.21A
;******************************************************************************
#include <msp430x44x.h>
;------------------------------------------------------------------------------
ORG 01100h ; Program Start
;------------------------------------------------------------------------------
RESET mov.w #0A00h,SP ; Initialize stack pointer
StopWDT mov.w #WDTPW+WDTHOLD,&WDTCTL ; Stop WDT
SetupFLL bis.b #XCAP14PF,&FLL_CTL0 ; Configure load caps
mov #10000,R15 ;
Xtal_Wait dec R15 ; Delay for 32 kHz crystal to
jnz Xtal_Wait ; stabilize
SetupLCD mov.b #LCDON+LCD4MUX+LCDSG0_4,&LCDCTL
; LCD on, 4-Mux, select pins S0-S27
SetupBT mov.b #BT_fLCD_DIV128,&BTCTL ; freqLCD = ACLK/128
SetupIO mov.b #0FCh,&P5SEL ; COMx and Rxx selected
;
Mainloop clr.w R5 ; Clear index
Disp mov.b LCD_Tab(R5),LCDMEM(R5) ; Copy LCD map value to LCD memory
inc.w R5 ; Increment index
cmp.w #07,R5 ; Is index = 7?
jne Disp ; No, jump to label
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
;-----------------------------------------------------------------------------
ORG 0FFFEh ; RESET Vector
DW RESET ;
END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -