From 927a6564ced09f1ed8355a0b77774e3757a9b77c Mon Sep 17 00:00:00 2001 From: Leonard Kugis Date: Wed, 5 Oct 2022 21:01:37 +0200 Subject: Fixed code, updated to 10 bit ADC usage --- test.asm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 test.asm (limited to 'test.asm') diff --git a/test.asm b/test.asm new file mode 100644 index 0000000..fc63cbb --- /dev/null +++ b/test.asm @@ -0,0 +1,27 @@ + +.include "tn85def.inc" +.def tmp0 = r16 +.def tmp1 = r17 +.def tmp2 = r18 +.def tmp3 = r19 + +; Interrupt vectors +.org 0x0000 +interrupts: + rjmp init + +.org INT_VECTORS_SIZE +init: + ; Initialize stack pointer + ldi tmp0, HIGH(RAMEND) + out SPH, tmp0 + ldi tmp0, LOW(RAMEND) + out SPL, tmp0 + ; Set pin directions + ldi tmp0, 0b00010010 + out DDRB, tmp0 + ldi tmp0, 0b00010010 + out PORTB, tmp0 + +main: + rjmp main -- cgit v1.2.1