Thursday, May 21, 2015

Serial Communication at ATTiny13A (#3)

Since we need to set the baud rate. We have to use either manual delay or timer interrupt.

For now, I am trying using manual delay.

Check whether the Pin B0 is blinking using this code

.include "../"
.org 0x00
ldi r16, 0b00000001
out ddrb,r16
ldi r17,0xff
ldi r18,0xff
sbi PORTB,0
rcall delay
cbi PORTB,0
rcall delay
rjmp loop
dec r17
brne delay
dec r18
brne delay

yup, it is