mini project

mini project - ldi R19,0xFF out 0x3e, R18 out 0x3D, R19...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
.def counter =R5 .def ctime=R20 .equ TCCR2 = 0x25 .equ OCR2 = 0x23 .equ DDRB = 0x17 .equ PORTB = 0x18 ;------------------------------------------ //This is where program starts .org 0x0000 ;;by default this is the .CSEG code segment which has default 0 org rjmp RESET ;relative jump to RESET label RESET: ;--Set stack pointer ldi R18, 0x10 ; set stack pointer by loading RAM END value
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ldi R19,0xFF out 0x3e, R18 out 0x3D, R19 ;set up Port B for output ldi R31,0xFF out DDRB, R31 ;setup output high on Port B, pin 0 ldi R29, 0x00 ldi R30, 0x00 ldi R31, 0x64 //Load value of TCCR2 out TCCR2, R31 //write to TCCR2 out OCR2, R20 //write to OCR2...
View Full Document

This note was uploaded on 09/08/2010 for the course ME 106 at San Jose State.

Ask a homework question - tutors are online