- Name:
- daclevel
- Syntax:
-
DACLEVEL level
Level - is a variable/constant which specifies the DAC output level (0-31).
- Description:
-
Set the DAC output level (32 steps, valid value 0-31).
The daclevel command is used to set the DAC output level to one of 32 levels which cover the entire voltage range of the DAC. Therefore each level is 1/32nd of the maximum voltage. A 'readdac' command can also read the DAC value, this is equivalent to a 'readadc command on the DAC level'. A dacsetup command must have been used to setup the DAC before this command will function.
Set the DAC output level
Set up the DAC and cycle through the output levels
- Code Example:
-
init: dacsetup %10100000 ; external DAC, supply voltage main: for b1 = 0 to 31 daclevel b1 ; set DAClevel pause 1000 next b1 goto main ; loop back to start
Copy Code Submit an Example
Submit Your Own Code!
You must be logged in to submit code examples. Login now.