Skip to content
  • Home
  • Account
  • Restricted content
  • OBEX
  • Chips Tips
  • Logout
  • Shop
  • Blog
Propeller OBEX
  • OBEX
  • Forum
Login
Propeller OBEX
View Categories
  • Home
  • Docs
  • Language Reference
  • Spin Language Reference
  • Block Designators
  • Blocks

Blocks

Reading Time: 1 min read

Each Propeller object is a Spin file that has an inherent structure consisting of up to six different special-purpose blocks: CON, VAR, OBJ, PUB, PRI, and DAT.

  • CON — Declare a Constant Block. to add global constants to your object.
  • VAR — Declare a Variable Block to add global variables to your object.
  • OBJ — Include external objects in your object.
  • PUB — Define functions that will be accessible to objects that include this one.
  • PRI — Define functions that will be private to this object.
  • DAT — Define data and assembly code.

Valid Keywords #

These blocks are shown below (in the order that they typically appear in objects) along with the set of keywords usable within each.

For detailed examples of the object (Spin) structure and usage, refer to the Propeller Programming Tutorial in the Propeller Tool Help.

CON: Constant blocks define global constants #


_CLKFREQNEGXPLL16XXINPUT
_CLKMODEOperators*POSXXTAL1
_FREEPIRCFASTXTAL2
_STACKPLL1XRCSLOWXTAL3
_XINFREQPLL2XROUND 
FALSEPLL4XTRUE 
FLOATPLL8XTRUNC 

*Non-assignment operators only.

VAR: Variable blocks define global variables #


BYTELONGROUNDTRUNC
FLOATOperators*WORD 

*Non-assignment operators only.

OBJ: Object blocks define referenced objects #


FLOATOperators*ROUNDTRUNC

*Non-assignment operators only.

PUB / PRI: Public and Private method blocks define Spin routines #


ABORTFLOATOperatorsROUND
BYTEFRQAOUTASPR
BYTEFILLFRQBOUTBSTRCOMP
BYTEMOVEIFPARSTRING
CASEIFNOTPHSASTRSIZE
CHIPVERINAPHSBTRUE
CLKFREQINBPITRUNC
CLKMODELOCKCLRPLL1XVCFG
CLKSETLOCKNEWPLL2XVSCL
CNTLOCKRETPLL4XWAITCNT
COGIDLOCKSETPLL8XWAITPEQ
COGINITLONGPLL16XWAITPNE
COGNEWLONGFILLPOSXWAITVID
COGSTOPLONGMOVEQUITWORD
CONSTANTLOOKDOWNRCFASTWORDFILL
CTRALOOKDOWNZRCSLOWWORDMOVE
CTRBLOOKUPREBOOTXINPUT
DIRALOOKUPZREPEATXTAL1
DIRBNEGXRESULTXTAL2
FALSENEXTRETURNXTAL3

DAT: Data blocks define data and Propeller Assembly code #


AssemblyFRQBPITRUNC
BYTEINAPLL1XVCFG
CNTINBPLL2XVSCL
CTRALONGPLL4XWORD
CTRBNEGXPLL8XXINPUT
DIRAOperators*PLL16XXTAL1
DIRBOUTAPOSXXTAL2
FALSEOUTBRCFASTXTAL3
FILEPARRCSLOW 
FLOATPHSAROUND 
FRQAPHSBTRUE 

*Non-assignment operators only.

Was this useful ?
Share This Article :
  • Facebook
  • X
  • LinkedIn
Still stuck? How can we help?

Still stuck? How can we help?

Updated on February 20, 2025
VARCON
Table of Contents
  • Valid Keywords
    • CON: Constant blocks define global constants
    • VAR: Variable blocks define global variables
    • OBJ: Object blocks define referenced objects
    • PUB / PRI: Public and Private method blocks define Spin routines
    • DAT: Data blocks define data and Propeller Assembly code

Copyright © 2025 - Parallax Inc.
599 Menlo Drive | Rocklin, CA 95765 | USA