Propeller Manual
Table Of Contents
- Preface
- Chapter 1 : Introducing the Propeller Chip
- Concept
- Package Types
- Pin Descriptions
- Specifications
- Hardware Connections
- Boot Up Procedure
- Run-Time Procedure
- Shutdown Procedure
- Block Diagram
- Shared Resources
- System Clock
- Cogs (processors)
- Hub
- I/O Pins
- System Counter
- CLK Register
- Locks
- Main Memory
- Main RAM
- Main ROM
- Character Definitions
- Log and Anti-Log Tables
- Sine Table
- Boot Loader and Spin Interpreter
- Chapter 2 : Spin Language Reference
- Structure of Propeller Objects/Spin
- Categorical Listing of Propeller Spin Language
- Spin Language Elements
- ABORT
- BYTE
- BYTEFILL
- BYTEMOVE
- CASE
- CHIPVER
- CLKFREQ
- _CLKFREQ
- CLKMODE
- _CLKMODE
- CLKSET
- CNT
- COGID
- COGINIT
- COGNEW
- COGSTOP
- CON
- CONSTANT
- Constants (pre-defined)
- CTRA, CTRB
- DAT
- DIRA, DIRB
- FILE
- FLOAT
- _FREE
- FRQA, FRQB
- IF
- IFNOT
- INA, INB
- LOCKCLR
- LOCKNEW
- LOCKRET
- LOCKSET
- LONG
- LONGFILL
- LONGMOVE
- LOOKDOWN, LOOKDOWNZ
- LOOKUP, LOOKUPZ
- NEXT
- OBJ
- Operators
- Expression Workspace
- Operator Attributes
- Unary / Binary
- Normal / Assignment
- Constant and/or Variable Expression
- Level of Precedence
- Intermediate Assignments
- Constant Assignment ‘=’
- Variable Assignment ‘:=’
- Add ‘+’, ‘+=’
- Positive ‘+’ (unary form of Add)
- Subtract ‘-’, ‘-=’
- Negate ‘-’ (unary form of Subtract)
- Decrement, pre- or post- ‘- -’
- Increment, pre- or post- ‘+ +’
- Multiply, Return Low ‘*’, ‘*=’
- Multiply, Return High ‘**’, ‘**=’
- Divide ‘/’, ‘/=’
- Modulus ‘//’, ‘//=’
- Limit Minimum ‘#>’, ‘#>=’
- Limit Maximum ‘<#’, ‘<#=’
- Square Root ‘^^’
- Absolute Value ‘||’
- Sign-Extend 7 or Post-Clear ‘~’
- Sign-Extend 15 or Post-Set ‘~~’
- Shift Arithmetic Right ‘~>’, ‘~>=’
- Random ‘?’
- Bitwise Decode ‘|<’
- Bitwise Encode ‘>|’
- Bitwise Shift Left ‘<<’, ‘<<=’
- Bitwise Shift Right ‘>>’, ‘>>=’
- Bitwise Rotate Left ‘<-’, ‘<-=’
- Bitwise Rotate Right ‘->’, ‘->=’
- Bitwise Reverse ‘><’, ‘><=’
- Bitwise AND ‘&’, ‘&=’
- Bitwise OR ‘|’, ‘|=’
- Bitwise XOR ‘^’, ‘^=’
- Bitwise NOT ‘!’
- Boolean AND ‘AND’, ‘AND=’
- Boolean OR ‘OR’, ‘OR=’
- Boolean NOT ‘NOT’
- Boolean Is Equal ‘==’, ‘===’
- Boolean Is Not Equal ‘<>’, ‘<>=’
- Boolean Is Less Than ‘<’, ‘<=’
- Boolean Is Greater Than ‘>’, ‘>=’
- Boolean Is Equal or Less ‘=<’, ‘=<=’
- Boolean Is Equal or Greater ‘=>’, ‘=>=’
- Symbol Address ‘@’
- Object Address Plus Symbol ‘@@’
- OUTA, OUTB
- PAR
- PHSA, PHSB
- PRI
- PUB
- QUIT
- REBOOT
- REPEAT
- RESULT
- RETURN
- ROUND
- SPR
- _STACK
- STRCOMP
- STRING
- STRSIZE
- Symbols
- TRUNC
- VAR
- VCFG
- VSCL
- WAITCNT
- WAITPEQ
- WAITPNE
- WAITVID
- WORD
- WORDFILL
- WORDMOVE
- _XINFREQ
- Chapter 3 : Assembly Language Reference
- The Structure of Propeller Assembly
- Categorical Listing of Propeller Assembly Language
- Assembly Language Elements
- ABS
- ABSNEG
- ADD
- ADDABS
- ADDS
- ADDSX
- ADDX
- AND
- ANDN
- CALL
- CLKSET
- CMP
- CMPS
- CMPSUB
- CMPSX
- CMPX
- CNT
- COGID
- COGINIT
- COGSTOP
- Conditions ( IF_x )
- CTRA, CTRB
- DIRA, DIRB
- DJNZ
- Effects ( WC, WZ, WR, NR )
- FIT
- FRQA, FRQB
- HUBOP
- IF_x (Conditions)
- INA, INB
- JMP
- JMPRET
- LOCKCLR
- LOCKNEW
- LOCKRET
- LOCKSET
- MAX
- MAXS
- MIN
- MINS
- MOV
- MOVD
- MOVI
- MOVS
- MUXC
- MUXNC
- MUXNZ
- MUXZ
- NEG
- NEGC
- NEGNC
- NEGNZ
- NEGZ
- NOP
- NR
- Operators
- OR
- ORG
- OUTA, OUTB
- PAR
- PHSA, PHSB
- RCL
- RCR
- RDBYTE
- RDLONG
- RDWORD
- Registers
- RES
- RET
- REV
- ROL
- ROR
- SAR
- SHL
- SHR
- SUB
- SUBABS
- SUBS
- SUBSX
- SUBX
- SUMC
- SUMNC
- SUMZ
- Symbols
- TEST
- TESTN
- TJNZ
- TJZ
- VCFG
- VSCL
- WAITCNT
- WAITPEQ
- WAITPNE
- WAITVID
- WC
- WR
- WRBYTE
- WRLONG
- WRWORD
- WZ
- XOR
- Appendix A: Reserved Word List
- Appendix B: Math Samples and Function Tables
- Index
Index
CLKSET (spin), 71–72
Clock
Configuring, 28, 67
Frequency, 63, 65, 71
Frequency range, 29
Mode, 28, 31, 67, 68
Mode Setting Constants (table), 68, 69
PLL, 22, 28, 65
Sources, 22
System, 22
CMP (asm), 272–73
CMPS (asm), 274–75
CMPSUB (asm), 276
CMPSX (asm), 277–79
CMPX (asm), 280–81
CNT (asm), 23, 282, 338
CNT (spin), 23, 73–74, 200
Cog
Assembly pointer, 328
Boot parameter register, 178, 331
Control (asm), 243, 283, 284, 286
Control (spin), 39, 75, 76, 78, 83, 187
First instruction address, 23, 239
ID, 75, 283
RAM, 23, 240
RAM (spec), 16
RAM Map (figure), 23
Registers (table), 338
Start, 76–77, 78–82, 284
Stop, 83, 286
Structure, 20–21, 20–21, 20–21
Cog-Hub interaction, 21
Cog-Hub Interaction (figure), 25
COGID (asm), 283
COGID (spin), 75
COGINIT (asm), 284–85
COGINIT (spin), 76–77
COGNEW (spin), 78–82
Cogs (processors), 22
COGSTOP (asm), 286
COGSTOP (spin), 83
Collisions, resource, 122
Combining conditions, 113
Common resources, 22, 26, 27
Common syntax elements (asm), 250
CON (spin), 84–90
CON field (asm), 251
Concise truth tables, 252
Condition field (asm), 250
Conditional code (spin), 59, 112, 117
Conditional loops, 192
Conditions (asm), 243, 287, 295
Conditions, Assembly (table), 296
Configuration (asm), 243, 271
Configuration (spin), 38, 62, 63, 65, 67, 68, 71, 94,
110, 202, 236
CONSTANT (spin), 91–92
Constant Assignment ‘=’, 148
Constant block, 84
Constant Declarations, 85
Constant Expression Math/Logic Oper. (table), 326
Constant expression operators, 146
Constants (pre-defined), 93–94
Counted finite loops, 190
Counter
Control, 23, 95, 288
Frequency, 23, 111, 293
Modes (table), 98
Phase, 23, 180, 332
Registers, 95, 288
Crystal Input (pin), 15
Crystal oscillator, 28
Crystal Output (pin), 15
CTRA and CTRB Registers (table), 96
CTRA, CTRB (asm), 23, 288, 338
CTRA, CTRB (spin), 23, 95–98, 200
Current draw (spec), 16
Current source/sink (spec), 15, 16
D
DAC, 95
DAT (spin), 99–103
Data
Declaring bytes, 52
Declaring longs, 129
Declaring words, 229
Reading/writing, 53, 130, 229
Data block, 99
Data tables, 51, 100, 128, 136, 138, 227
Decimal point, ., 207
Declaring data, 100
Decode, Bitwise ‘|<’, 160
Decrement, pre- or post- ‘- -’, 151
Delay
Propeller Manual v1.1 · Page 389