Microcontroller Propeller 2

Sharing variables between SPIN2 and PASM2

Introduction Code for the Propeller 2 (whether written in the native SPIN2, C or other high level language), can usually benefit from a bit of PASM2 (assembly code) to help create super-fast drivers for real world interfacing! That PASM2 code…

Keep any value in range

Introduction The Propeller 2 native SPIN2 language includes many efficient instructions to solve common programming tasks. For example, how to keep a value between a certain range of allowed values? Here’s an example using just one line of code! Code…

Determine pin state - High, Low or Floating?

Introduction A common requirement for programmers is to determine the external state of an IO pin. The Propeller 2 smart IO pins make this simple without needing any external components, and allow the programmer to determine if the pin is…