Skip to content
  • Home
  • Account
  • Restricted content
  • OBEX
  • Chips Tips
  • Logout
  • Shop
  • QuickBytes
Propeller OBEX
  • OBEX
  • Forum
Login
Propeller OBEX

Propeller 1

  • Tilde manipulation of the DIRA and OUTA registers
  • How to pause in PASM
  • How to choose between VAR and DAT
  • WAITPEQ and WAITPNE with PASM
  • IO pin manipulation using PASM
  • Control IO pins from any cog
  • 3D Models for Parallax Products
  • Implementing Abstract Data Structures with Spin Objects
  • Making in USA - The Parallax 8 core microcontroller
  • Simultaneous pin group control
  • Programming the FLiP module over WiFi
  • Keep any value in range
  • Handy Diagnostic Heartbeat
  • Customer Code Deployment in one click

Propeller 2

  • Control your loops like a champ
  • Generate a clock with any SmartPin
  • Floating point operators in SPIN2
  • 64/96/128-Bit Unsigned Integer Math
  • 3D Models for Parallax Products
  • DEBUG Plot Layer and Crop
  • Floating point
  • Getting Started Video Tutorials
  • Using the counter for timeouts
  • asmclk and the automatic clock setter
  • Sharing variables between SPIN2 and PASM2
  • Keep any value in range
  • Determine pin state - High, Low or Floating?
View Categories
  • Home
  • Docs
  • Chips Tips
  • Propeller 1
  • Tilde manipulation of the DIRA and OUTA registers

Tilde manipulation of the DIRA and OUTA registers

Reading Time: 1 min read

SPIN

Introduction #

The Propeller Spin language uses the single-tilde and double-tilde suffixes for compact single-bit manipulation on the DIRA and OUTA registers.

These are single-bit assignment operations that work only for the DIRA and OUTA registers and are an extremely concise way to set or clear a bit.

DIRA #

The command dira[Pin]~~ sets the direction of the specified I/O pin to Output mode.

  • Function: It sets the corresponding bit in the DIRA register to 1.
  • Result: The pin is configured as an Output, allowing its state to be driven HIGH or LOW by the OUTA register.
  • Equivalent: The dira[Pin]~~ command is shorthand for the standard assignment: dira[Pin]:=1
CommandActionI/O FunctionTraditional Equivalent
dira[Pin]∼Set LOW (Clear Bit)Inputdira[Pin]:=0
dira[Pin]∼∼Set HIGH (Set Bit)Outputdira[Pin]:=1

OUTA #

The command outa[Pin]~ forces the state of the I/O pin specified by Pin in the output register (OUTA) to 0 (LOW).

  • Function: It sets the corresponding bit in the OUTA register to 0.
  • Result: The pin is driven LOW when the DIRA register is set to output.
  • Equivalent: The outa[Pin]~ command is shorthand for the standard assignment: outa[Pin]:=0
CommandActionBit ValueTraditional Equivalent
outa[Pin]∼Set LOW (Clear Bit)0outa[Pin]:=0
outa[Pin]∼∼Set HIGH (Set Bit)1outa[Pin]:=1
outa[Pin]∧=1Toggle (XOR)Toggleouta[Pin]∧=1


Resources #

Parallax Community Forums

Parallax Propeller 1 Manual

Parallax Propeller 1 Documentation


Was this useful ?

Share This Article :

  • Facebook
  • X
  • LinkedIn
Still stuck? How can we help?

Still stuck? How can we help?

Updated on October 8, 2025
Customer Code Deployment in one clickHow to pause in PASM
Table of Contents
  • Introduction
  • DIRA
  • OUTA
  • Resources

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