avr2 - O SBRS R21,0 RCALL TANG SBRS R21,1 RCALL GIAM MOV...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
.INCLUDE "M8DEF.INC" .CSEG. .ORG 0x0000 RJMP BATDAU R .ORG 0x0020 BATDAU: ;KHOI DONG STACK POINTER LDI R17, HIGH(RAMEND) LDI R16, LOW(RAMEND) OUT SPL, R16 OUT SPH,R17 O ; KHOI DONG CAC PORT CLR R16; OUT DDRB, R16; LDI R16, 0xFF; OUT PORTB, R16 OUT DDRD, R16; =;STS 0x0031, R16 O CLR R25 SER R20 ; R21 LA THANH GHI TAM CHUA GIA TRI TRUOC DO CUA PINB S MAIN: IN R21,PINB RCALL SOSANH OUT PORTD,R25
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: O SBRS R21,0 RCALL TANG SBRS R21,1 RCALL GIAM MOV R20,R21 RJMP MAIN R ;**********************CHUONG TRINH CON******************************** SOSANH: CPI R25, 10 BREQ RESET0 CPI R25, 255 BREQ RESET9 RJMP QUAYVE RESET0: LDI R25,$0 RJMP QUAYVE RESET9: LDI R25,$9 QUAYVE: RET R TANG: SBRS R20,0 RET INC R25 RET GIAM: SBRS R20,1 RET DEC R25 RET...
View Full Document

Page1 / 2

avr2 - O SBRS R21,0 RCALL TANG SBRS R21,1 RCALL GIAM MOV...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online