.nolist .include "m8adef.inc" .list .def tmp = r16 .def buf = r17 .def b00 = r18 .def bff = r19 .def buf0 = r20 .def buf1 = r21 .def buf2 = r22 .def buf3 = r23 .def buf4 = r24 .def buf5 = r25 .def buf6 = r26 .def buf7 = r27 ;1-wire port ;connect up to 8 DS18B20, each one to its own portpin! .equ ddr = DDRB .equ port = PORTB .equ pin = PINB .cseg .org 000000 main: ;init stack pointer .ifdef SPH ; if SPH is defined ldi tmp,High(RAMEND) out SPH,tmp ; Init MSB stack pointer .endif ldi tmp,Low(RAMEND) out SPL,tmp ; Init LSB stack pointer ;init general purpose constant registers clr b00 ldi bff, 0xff ;init 1-wire bus out ddr, b00 ;input out port, bff ;pullup ;init uart to 4800 at 1MHz clock (internal RC oscillator) ldi tmp, HIGH(12) out UBRRH, tmp ldi tmp, LOW(12) out UBRRL, tmp ldi tmp, (1<gemini://lasse.nerdcamp.net/static/8-channel-ds18b20-temp-logger-avr-uart/mega8_ds18uart.asm

-- Leo's gemini proxy

-- Connecting to lasse.nerdcamp.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/plain;lang=de

-- Response ended

-- Page fetched on Mon May 20 18:02:46 2024