; gps baud changer ; (c) 2009 by DH6MBM ; This code is freeware, and can be modified, redistributed and whatever ; you like. .include "def/tn13def.inc" ;.define RS232 ; use RS232 level, which is inverted .equ PRELOAD = 256 - 71 ; baud constant for timer .equ OUTPORT = PORTB .equ OUTCTL = DDRB .equ OUTPIN = PB4 .def zero = r2 .def one = r1 .def temp = r16 .def char = r3 .def pre = r18 .def counter = r19 .cseg rjmp main reti reti rjmp SIG_OVERFLOW0 reti reti reti reti reti reti SIG_OVERFLOW0: out TCNT0, pre ; set next timer cycles .ifdef RS232 sbrc char, 0 ; inverted .else sbrs char, 0 .endif rjmp ov1 sbi OUTPORT, OUTPIN reti ov1: cbi OUTPORT, OUTPIN reti main: ldi temp, RAMEND ; stack init out SPL, temp clr zero clr one inc one ldi temp, 1<