SPIMOVE

From MCS Wiki AVR
(Difference between revisions)
Jump to: navigation, search
 
Line 9: Line 9:
 
= <span class="f_Header">Syntax</span> =
 
= <span class="f_Header">Syntax</span> =
  
var =&nbsp;<span class="f_Syntax">SPIMOVE</span>( byte )
+
var =&nbsp;<span class="f_Syntax">SPIMOVE</span>( byte [,count] )
  
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>

Latest revision as of 13:28, 4 February 2014

Contents

Action

Sends and receives a value or a variable to the SPI-bus.

 

 

Syntax

var = SPIMOVE( byte [,count] )

 

 

Remarks

Var

The variable that is assigned with the received byte(s) from the SPI-bus.

Byte

The variable or constant whose content must be send to the SPI-bus.

Count

Optional byte value which specifies how many bytes need to be moved.

 

 

See also

SPIIN , SPIINIT , CONFIG SPI

 

 

Example


Config Spi = Soft , Din = Pinb.0 , Dout = Portb.1 , Ss = Portb.2 , Clock = Portb.3
 
Spiinit
 
Dim a(10) as Byte , X As Byte
 
Spiout A(1) , 5 'send 5 bytes
Spiout X , 1 'send 1 byte
A(1) = Spimove(5) ' move 5 to SPI and store result in a(1)
End

Languages   English Deutsch  
Personal tools
Namespaces
Variants
Actions
Navigation
In other languages
Language