Professional Documents
Culture Documents
Waves
Waves
EXPORT __main
ENTRY
__main
ldr R3, =0x000003FF ; constant for compare operation
ldr R1, =PINSEL1 ; Address of PINSEL1
ldr R2, =0x00080000 ;
str R2, [R1] ;
ldr R0, =DACR ; DACR Register
ldr R2, =0x0;
DtoA
lsl R1, R2, #6 ; shift R2 left 6 places and put in R1
str R1, [R0] ; Output to D to A
add R2, R2, #1 ; increment R2
cmp R2, R3 ; Check if too big
B DtoA ;
END
EXPORT __main
ENTRY
__main
ldr R3, =0x000003FF ; constant for compare operation
ldr R1, =PINSEL1 ; Address of PINSEL1
ldr R2, =0x00080000 ;
str R2, [R1] ;
ldr R0, =DACR ; DACR Register
ldr R2, =0x0;
DtoAp
lsl R1, R2, #6 ; shift R2 left 6 places and put in R1
str R1, [R0] ; Output to D to A
add R2, R2, #1 ; increment R2
cmp R2, R3 ; Check if too big
END