public class DAC extends Object
ADC
Constructor and Description |
---|
DAC(int pwmChannel)
Gets PWM frequency and duty cycle values of already active DAC channel i.e.
|
DAC(int pwmFreq,
int startDutyCycle)
Deprecated.
use
DAC(int, int, int) instead |
DAC(int pwmChannel,
int pwmFreq,
int startDutyCycle)
Creates a new instance of the DAC class.
|
Modifier and Type | Method and Description |
---|---|
int |
getDutyCycle()
Gets the current duty cycle.
|
int |
getPwmFreq()
Gets the current PWM frequency.
|
void |
release()
Releases all HW resources.
|
void |
setDutyCycle(int dutyCycle)
Sets the duty cycle.
|
public DAC(int pwmChannel, int pwmFreq, int startDutyCycle) throws IOException
pwmChannel
- Selects PWM channel for signal generation. Valid values are from 0 to 1.pwmFreq
- Selects the PWM frequency. Valid values are from 0 to 5.startDutyCycle
- Initial duty cycle in percentage steps. Valid values are from 0 to 100.IOException
- if an error occurspublic DAC(int pwmFreq, int startDutyCycle) throws IOException
DAC(int, int, int)
insteadpwmFreq
- Selects the PWM frequency. Valid values are from 0 to 5.startDutyCycle
- Initial duty cycle in percentage steps. Valid values are from 0 to 100.IOException
- if an error occurspublic DAC(int pwmChannel) throws IOException
pwmChannel
- Selects PWM channel for acquisition of current settings. Valid values are from 0 to 1.IOException
- if DAC channel is not active or an error occurspublic void setDutyCycle(int dutyCycle) throws IOException
dutyCycle
- Duty cycle in percentage steps. Valid values are from 0 to 100.IOException
- if an error occursgetDutyCycle()
public int getDutyCycle()
getDutyCycle()
public int getPwmFreq()
public void release() throws IOException
IOException
- if an error occursDAC
Copyright (c) 1990, 2012, Oracle and/or its affiliates. All rights reserved.