
;-----------------------------------------------------------------
; Name:			Test Pull UP.asm
; Description:	Test Internal Pull Ups on chip

; Author:		Max Koessick
; Class:		EEL5666C, Intelligent Machine Design Lab
; Date:			June 28, 2003
; Revision		1.a
; Changes to Date:
;				7/9/03 First Revision
;-----------------------------------------------------------------

.nolist								; Do not include in .lst file
.include "m323def.inc"				; Standard ATMega323 Include File
.list
; Interrupt service vectors

.org $0000
	rjmp Reset						; Reset vector

.def mpr	=	r16
.def mpr2	=	r17

Reset:

;-----Set Port Directions-----------------------------------------


	ldi		mpr,0b11110011			; Define PD2/3 as input
	ldi		mpr2,(1<<PD2)|(1<<PD3)
									; Define pull ups on the input pins of PORTD
	out 	DDRD,mpr				; Set 'D' as input
	out		PORTD,mpr2
