Initializing the MSP50C6xx
6-7
Applications
orb a0,0x7c
;set PLLM for CPU clock of 8 MHz
mov *save_clkspdctrl,a0
;save the ClkSpdCtrl value for later, when
;waking up from mid or deep sleep
mov a0~,TIM2 TIM2IMR
;disable TIMER 2
out IntGenCtrl,a0~
mov a0~,6553
;setup a 200 ms period
out TIM2,a0~
;load TIM2 and PRD2 in one fell swoop
mov a0~,TIM2 TIM2 TIM2IMR
out IntGenCtrl,a0~
;use 32 kHz crystal as source, wake up from TIM2
out ClkSpdCtrl,a0
;set clock to full speed!
idle
;go to sleep...
nop
;wake up 200 ms later, clock running at full speed
nop
nop
;****************************************************************
; Upon reset all ports are set to input and port G output is set
; low (0x0000). Therefore it remains only to enable the pullups
; on port F.
;****************************************************************
in
a0,IntGenCtrl
or
a0,PFPULLUPS
;enable port F pullups
and a0,~TIM2IMR
;turn off TIMER 2 interrupt
and a0,~TIM2ENABLE
;turn off TIMER 2 ––– added 28.11.99
out IntGenCtrl,a0
;****************************************************************
; Set the DAC to 10 bits, C3x style. For C5x style set bit 3
; high.
;****************************************************************
movb
a0,0x02
;choose 10 bit DAC, C3x style
orb a0,DACON
;enable DAC
out DACCTRL,a0
;switch DAC on
;****************************************************************
; Initialization complete. Now tidy up and branch to the main
; user code.
;****************************************************************
zac a0
;tidy up
zac a0~
jmp _main
;jump to the main program
Содержание MSP50C6xx
Страница 1: ...MSP50C6xx Mixed Signal Processor User s Guide Mixed Signal Products SPSU014A Printed on Recycled Paper...
Страница 6: ...vi...
Страница 14: ...xiv...
Страница 24: ...1 10...
Страница 296: ...Instruction Set Summay 4 210 Assembly Language Instructions...
Страница 332: ...Implementation Details 5 36 R7 Return Addr Return Addr Param 2 Param 2 Param 1 Param 1 R5 Stack data Function call...
Страница 366: ...6 12...