Datasheet

Table Of Contents
<instruction> (side <side_set_value>) ([<delay_value>])
where:
<instruction> Is an assembly instruction detailed in the following sections. (See Section 3.4)
<side_set_value> Is a value (see Section 3.3.3) to apply to the side_set pins at the start of the instruction. Note that
the rules for a side set value via side <side_set_value> are dependent on the .side_set (see
[pioasm_side_set]) directive for the program. If no .side_set is specified then the side
<side_set_value> is invalid, if an optional number of sideset pins is specified then side
<side_set_value> may be present, and if a non-optional number of sideset pins is specified, then side
<side_set_value> is required. The <side_set_value> must fit within the number of side set bits
specified in the .side_set directive.
<delay_value> Specifies the number of cycles to delay after the instruction completes. The delay_value is specified
as a value (see Section 3.3.3), and in general is between 0 and 31 inclusive (a 5 bit value), however
the number of bits is reduced when sideset is enabled via the .side_set (see [pioasm_side_set])
directive. If the <delay_value> is not present, then the instruction has no delay
NOTE
pioasm instruction names, keywords and directives are case insensitive; lower case is used in the Assembly Syntax
sections below as this is the style used in the Pico SDK.
NOTE
Commas appear in some Assemby Syntax sections below, but are entirely optional, e.g. out pins, 3 may be written out
pins 3, and jmp x-- label may be written as jmp x--, label. The Assembly Syntax sections below uses the first style in
each case as this is the style used in the Pico SDK.
3.3.8. Output pass through
Text in the PIO file may be passed, unmodifed, to the output based on the language generator being used.
For example the following (comment and function) would be included in the generated header when the default c-sdk
language generator is used.
% c-sdk {
// an inline function (since this is going in a header file)
static inline int some_c_code() {
Ê return 0;
}
%}
The general format is
% target {
pass thru contents
%}
with targets being recognized by a particular language generator (see Section 3.3.9; note that target is usually the
language generator name e.g. c-sdk, but could potentially be some_language.some_some_group if the the language generator
supports different classes of pass thru with different output locations.
RP2040 Datasheet
3.3. PIO Assembler (pioasm) 316