Hello
I have this statement in this library
-- Write two byte to the SPI bus
procedure spi_write_2(byte in b1, byte in b2) is
spi_ce = low
for cascading loop What is the meaning of this
statement? "cascading"
I don't find this in JAl
books.
-- byte 1, bits 8 - 1
if (b1 & 128) > 0 then Thanks a lot, Phil
spi_dao = high
else
spi_dao = low
end if
spi_clk = high
spi_clk = low
if (b1 & 64) > 0 then
spi_dao = high
else
spi_dao = low
end if
spi_clk = high
spi_clk = low
if (b1 & 32) > 0 then
spi_dao = high
else
spi_dao = low
end if
spi_clk = high
spi_clk = low
if (b1 & 16) > 0 then
spi_dao = high
else
spi_dao = low
end if
spi_clk = high
spi_clk = low
if (b1 & 8) > 0 then
spi_dao = high
else
spi_dao = low
end if
spi_clk = high
spi_clk = low
if (b1 & 4) > 0 then
spi_dao = high
else
spi_dao = low
end if
spi_clk = high
spi_clk = low
if (b1 & 2) > 0 then
spi_dao = high
else
spi_dao = low
end if
spi_clk = high
spi_clk = low
if (b1 & 1) > 0 then
spi_dao = high
else
spi_dao = low
end if
spi_clk = high
spi_clk = low
-- byte 2, bits 8 - 1
if (b2 & 128) > 0 then
spi_dao = high
else
spi_dao = low
end if
spi_clk = high
spi_clk = low
if (b2 & 64) > 0 then
spi_dao = high
else
spi_dao = low
end if
spi_clk = high
spi_clk = low
if (b2 & 32) > 0 then
spi_dao = high
else
spi_dao = low
end if
spi_clk = high
spi_clk = low
if (b2 & 16) > 0 then
spi_dao = high
else
spi_dao = low
end if
spi_clk = high
spi_clk = low
if (b2 & 8) > 0 then
spi_dao = high
else
spi_dao = low
end if
spi_clk = high
spi_clk = low
if (b2 & 4) > 0 then
spi_dao = high
else
spi_dao = low
end if
spi_clk = high
spi_clk = low
if (b2 & 2) > 0 then
spi_dao = high
else
spi_dao = low
end if
spi_clk = high
spi_clk = low
if (b2 & 1) > 0 then
spi_dao = high
else
spi_dao = low
end if
spi_clk = high
spi_clk = low
end loop
-- loads the new volume setting
spi_ce = high
end procedure
--
You received this message because you are subscribed to the Google Groups
"jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/jallib.
For more options, visit https://groups.google.com/groups/opt_out.