USART - RS-232 - Recieve


;; (C) David Vajda
;; 2024-12-20
;; RS-232, Recieve

.include "m8def.inc"

ldi r16, HIGH (RAMEND)
out SPH, r16
ldi r16, LOW (RAMEND)
out SPH, r16

ldi r16, 0xff
out DDRB, r16

ldi r16, HIGH (25)
out UBRRH, r16
ldi r16, LOW (25)
out UBRRL, r16

ldi r16, (1 << URSEL) | (1 << UCSZ1) | (1 << UCSZ0)
out UCSRC, r16
ldi r16, (1 << RXEN)
out UCSRB, r16

urecieve:
sbis UCSRA, RXC
rjmp urecieve
in r16, UDR
out PORTB, r16
rjmp urecieve

My - Phone Number!

Call me - if you can


01735807467


#!/bin/bash

b=(0 1 7 3 5 8 0 7 4 6 7)
a=(0 1 7 3 5 8 0 7 4 6 7)

i=0
while [ true ]
do
    while [ $i -lt 11 ]
    do
        i=$(($i+1))
        ./atoi "${a[$i]}" > /dev/ttyS3
        echo "${b[$i]}"
        sleep 1
    done
    i=0
done