Re: [Amforth] Quiestion about SPI core word spirw.asm

2014-08-29 Thread Matthias Trute
Hi Rafael, > do_spirw: > 1.out_ SPDR, tosl > do_spirw1: > 2.in_ temp0, SPSR > 3.cbr temp0,7 > 4.out_ SPSR, temp0 > 5.in_ temp0, SPSR > 6.sbrs temp0, 7 > 7.rjmp do_spirw1 ; wait until complete > 8.in_ tosl, SPDR > 9.ret > > In 1) we transmit a byte (and activa

Re: [Amforth] Quiestion about SPI core word spirw.asm

2014-08-29 Thread Rafael Gonzalez
ok, understood. Thank you ! So the optimized routine would be do_spirw: out_ SPDR, tosl do_spirw1: in_ temp0, SPSR sbrs temp0, 7 rjmp do_spirw1 ; wait until complete in_ tosl, SPDR ret Greetings Rafael El Viernes 29 de agosto de 2014 19:37, Matthias Trute escribió: