📄 fet410_lcd_01.s43
字号:
;******************************************************************************
; MSP-FET430P410 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 *//
;
; Connections MSP430 -> LCD
; -------------------------
;
; T.I. T.I. MSP-EVK430S320
; MSP430x41x MCU STK/EVK 6.5 digit 4 mux LCD
; #T218010
; --------------- --------------
; | COM3 |-----|2 COM4 |
; | COM2 |-----|1 COM3 |
; | COM1 |-----|3 COM2 |
; | COM0 |-----|4,20 COM1 |
; | SEG0 |-----|19 |
; | SEG1 |-----|18 |
; | SEG2 |-----|17 |
; | SEG3 |-----|16 |
; | SEG4 |-----|15 |
; | SEG5 |-----|14 |
; | SEG6 |-----|13 |
; | SEG7 |-----|12 |
; | SEG8 |-----|11 |
; | SEG9 |-----|10 |
; | SEG10|-----|9 |
; | SEG11|-----|8 |
; | SEG12|-----|7 |
; | SEG13|-----|6 |
; | SEG14|-----|5 (bits C,E,H |
; | | | of digit 7)|
; | | --------------
; | |
; ---------------
;
; NOTE: Pin R03 on the MSP430 must be connected to GND
;
; M. Buccini / H. Grewal
; Texas Instruments Inc.
; Feb 2005
; Built with IAR Embedded Workbench Version: 3.21A
;******************************************************************************
#include <msp430x41x.h>
;------------------------------------------------------------------------------
ORG 0E000h ; Program Start
;------------------------------------------------------------------------------
RESET mov.w #300h,SP ; Initialize 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
;-----------------------------------------------------------------------------
ORG 0FFFEh ; RESET Vector
DW RESET ;
END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -