Re: [Flashforth-devel] bit.txt problem
Brought to you by:
oh2aun
|
From: Mikael N. <mik...@fl...> - 2016-01-18 16:12:03
|
This might work. Not tested.
$24 constant ddrb
$24 constant portb
$01 constant out
$02 constant clk
ddrb out bit1: spi-out-pin
portb out bit0: spi-out-0
portb out bit1: spi-out-1
portb clk bit0: spi-clk-0
portb clk bit1: spi-clk-1
: spi! ( u --- )
spi-out-pin
spi-clk-0
#16 for
dup $0001 and
if spi-out-1 else spi-out-0 then
spi-clk-1 2/ spi-clk-0
next drop ;
Mike
On 18.01.2016 00:33, Donald Golding wrote:
> Does anyone have a sample of SPI code?
>
> Thanks,
> Don
|