Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as x86 Assembly by blah ( 3 years ago )
.msp430
.include "msp430x2xx.inc"
.org 0xc000
start:
;; Turn off watchdog timer.
mov.w #WDTPW|WDTHOLD, &WDTCTL
;; Set P1.0 and P1.6 as outputs.
mov.b #0x41, &P1DIR
main:
;; Initial value for LEDs turns on the P1.0 LED and
;; keeps P1.6 turned off.
mov.w #0x01, r8
;; enable interrupt
mov.w #TASSEL_2|ID_3|MC_1, &TACTL ; SMCLK, DIV1, COUNT to TACCR0
mov.w #65000, &TACCR0
mov.b #CCIE, &TACCTL0
mov.b #DCO_3, &DCOCTL
mov.b #RSEL_7, &BCSCTL1
while_1:
;; Repeat loop.
jmp while_1
update_p1:
;; Set LEDs to current value of r8 and toggle P1.0 and P1.6.
mov.b #P1OUT, r8
xor.b #0x41, r8
mov.b r8, &P1OUT
reti
.org 0xfffe
dw start ; set reset vector to 'init' label
.org 0xfff2
dw update_p1
Revise this Paste
Parent: 124816
Children: 124818