tstr .equ h'0fff60 tsnc .equ h'0fff61 tmdr .equ h'0fff62 tfcr .equ h'0fff63 toer .equ h'0fff90 tocr .equ h'0fff91 TCR0 .equ h'0fff64 TIOR0 .equ h'0fff65 TIER0 .equ h'0fff66 TSR0 .equ h'0fff67 TCNT0 .equ h'0fff68 GRA0 .equ h'0fff6A GRB0 .equ h'0fff6C .section vector,data,locate=h'000000 .data.l start .org h'0000d0 .section ram,data,locate=h'0fef10 div_data .res.w 1 .section program,code,locate=h'000100 start: mov.l #h'0fff0f,er7 ; stack pointer set mov.l #h'0fef10,er2 mov.w #h'0fe0,r1 mov.b #b'01000011,r0l ; Initialize TCR0 mov.b r0l,@TCR0 ; clock= 2MHz mov.b #B'00110000,r0l ; Initialize TIOR0 mov.b r0l,@TIOR0 ; GRB toggle mov.w #h'07d0,r0 ; Initialize GRB0 mov.w r0,@div_data mov.w r0,@GRB0 ; 500Hz bset #0,@tstr ; Start ITU ch0 loop: jmp @loop .end