;*************************************************************************** ; Application: Led flasher ; Author: Rue Mohr ; Date: ; Assembler: AVR Studio 4.07. ; Target: Atmel ATtiny13. ;*************************************************************************** ; pin 1: reset, tie high ; pin 2: ADC value, 0-5V in ; pin 3: not used ; pin 4: gnd ; pin 5: serial clock input ; pin 6: serial data out ; pin 7: not used ; pin 8: VCC +5V ;**************************************************************************** .device ATtiny13 ; ------------- Memory locations --------------- ; ; .def bar =r01 ; one byte ram location ; ; ---------------------------------------------- ; R 0 ->15 are gen. purp. .def A = r16 .def B = r17 ; and logic instructions .def C = r18 .def D = r19 .def _P = r20 .def _Q = r21 .def _R = r22 .def _S = r23 .def _T = r24 .def _U = r25 .def _V = r26 .def _W = r27 .def _X = r28 .def _Y = r29 .def _Z = r30 ;cant use r25 -> r31 ; ------------- Equates ------------------ .equ INPUT = 0 .equ OUTPUT = 1 ; --- Port Directions --- .equ PB0DIR = INPUT .equ PB1DIR = OUTPUT .equ PB2DIR = INPUT .equ PB3DIR = INPUT .equ PB4DIR = INPUT .equ PB5DIR = INPUT ; --- Initial port state --- .equ INPB0 = 0 .equ INPB1 = 1 .equ INPB2 = 0 .equ INPB3 = 0 .equ INPB4 = 0 .equ INPB5 = 1 ; --- Port Names --- .equ CLOCK = 0 .equ DATA = 1 ;.equ = 2 ;.equ = 3 ;.equ = 4 ;.equ = 5 ; RESET ; --- amalgimate --- .equ INITDIR = ((PB5DIR<