SPIMOVE

From MCS Wiki AVR
(Difference between revisions)
Jump to: navigation, search
(Created page with "= <span class="f_Header">Action</span> = Sends and receives a value or a variable to the SPI-bus. <span style="font-family: Arial;"> </span> <span style="font-family: ...")
 
 
(One intermediate revision by one user not shown)
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>
Line 16: Line 16:
  
 
= <span class="f_Header">Remarks</span> =
 
= <span class="f_Header">Remarks</span> =
<div style="padding: 0px; margin: 0px 0px 0px 4px;">
+
<div style="padding: 0px; margin: 0px 0px 0px 4px;"><div style="padding: 0px; margin: 0px 0px 0px 4px;">
 
{| width="573" cellspacing="0" cellpadding="1" border="1" style="border: 2px solid rgb(0, 0, 0); border-spacing: 0px; border-collapse: collapse;"
 
{| width="573" cellspacing="0" cellpadding="1" border="1" style="border: 2px solid rgb(0, 0, 0); border-spacing: 0px; border-collapse: collapse;"
 
|- style="vertical-align: top;"
 
|- style="vertical-align: top;"
Line 31: Line 31:
 
| valign="top" width="100%" style="width: 505px; border: 1px solid rgb(0, 0, 0);" |  
 
| valign="top" width="100%" style="width: 505px; border: 1px solid rgb(0, 0, 0);" |  
 
The variable or constant whose content must be send to the SPI-bus.
 
The variable or constant whose content must be send to the SPI-bus.
 +
 +
|- style="vertical-align: top;"
 +
| valign="top" width="11%" style="width: 59px; border: 1px solid rgb(0, 0, 0);" |
 +
Count
 +
 +
| valign="top" width="100%" style="width: 505px; border: 1px solid rgb(0, 0, 0);" |
 +
Optional byte value which specifies how many bytes need to be moved.
  
 
|}
 
|}
Line 37: Line 44:
  
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>
 +
</div>
  
 
= <span class="f_Header">See also</span> =
 
= <span class="f_Header">See also</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