SPI1INIT, SPI1IN, SPI1OUT, SPI1MOVE
(Difference between revisions)
Admin (Talk | contribs)
(Created page with "Some of the new MEGA processors like ATMEGA328<span style="font-weight: bold;">PB</span> have a second SPI bus. This is not a USART that can work in SPI mode but a full SPI bu...")
Newer edit →
(Created page with "Some of the new MEGA processors like ATMEGA328<span style="font-weight: bold;">PB</span> have a second SPI bus. This is not a USART that can work in SPI mode but a full SPI bu...")
Newer edit →
Revision as of 21:11, 17 January 2017
Some of the new MEGA processors like ATMEGA328PB have a second SPI bus. This is not a USART that can work in SPI mode but a full SPI bus.
In order to use the second SPI which is named SPI1, you have to add a '1' to the SPI commands :
The statements above link to the description of the SPI statements (SPI0).
'in this demo we only use the second SPI interface
ConfigSpi1 =Hard ,Interrupt =Off,Data_order =Msb ,Master =Yes ,Polarity =Low,Phase =0 ,Clockrate =128
'second SPI
Spi1init
B =5
Spi1outA(1),B
Spi1inA(1),B
A(1)=Spi1move(a(2))
Languages | English |
---|