Voltage

BlocklyProp reference for VOLTAGE blocks

Block availability varies by board type.


A/D read

Propeller Activity Board board type only

The A/D read block is designed for the A/D and D/A circuits built directly into the Propeller Activity Board (original and WX)

This block reads and reports the voltage input on the A/D channel chosen in the drop-down menu. The value provided by the block is in volt-hundredths: if +2.50 volts is applied to the A/D channel, the block will provide a value of 250.  It can be attached to a variable set block or used wherever a number value block is accepted.


D/A output

Propeller Activity Board board type only

This block launches a processor automatically. Using a second block for an additional D/A channel will not launch an additional processor.

The D/A output block sets the output voltage on the D/A channel chosen in the drop-down menu. The block expects a value in volt-hundredths: if value block placed in this block is 250, the D/A will output +2.50 volts.


A/D chip read

Propeller FLiP or Project Board and Other board types only

The A/D chip read block is designed for specific analog to digital converter chips that can be added to the prototyping area of Propeller boards.  This includes the ADC0831 and MCP3002 carried by Parallax, as well as other chips in the MCP3 line.

This block reports the voltage input on a channel of a supported A/D converter chip. It can be attached to a variable set block or used wherever a number value block is accepted. To use the block:

  • Select the A/D converter chip model you are using from the drop-down menu
  • Set the Propeller I/O pin numbers connected to the A/D chip's CLK, DO, DI and CS lines
  • Set the target channel on the A/D chip used. The options will vary depending on the A/D chip model chosen.

The value provided by the block is in volt-hundredths: if +2.50 volts is applied to the A/D channel, the block will provide a value of 250.  Unless the A/D chip set Vref block is used, this block assumes that the A/D chip's Vref pin is connected to +3.3 volts.


A/D chip set Vref

Propeller FLiP or Project Board and Other board types only

The A/D chip set Vref block is designed for specific analog to digital converter chips that can be added to the prototyping area of Propeller boards.  This includes the ADC0831 and MCP3002 carried by Parallax, as well as other chips in the MCP3 line.

This block is used to improve the accuracy of the value returned by the A/D chip read block and/or to use a different voltage (such as +5.0 volts) for the A/D chip's measurements.  Use this block before the A/D chip read block in your project, or at the beginning of your program to set the Vref value globally.  Enter the value of the voltage applied to the A/D chip's Vref pin. The number entered is in volt-hundredths; if +3.3 volts is applied to Vref, enter 330.