Signal Generator
Dependencies: IniManager RA8875 Watchdog mbed-rtos mbed
Fork of speaker_demo_Analog by
Diff: SignalGenDAC.h
- Revision:
- 5:49dd0c647a40
- Parent:
- 4:10281ddb673d
- Child:
- 6:1f48212fbaf9
--- a/SignalGenDAC.h Mon Jan 16 21:05:13 2017 +0000 +++ b/SignalGenDAC.h Mon Jan 16 22:57:59 2017 +0000 @@ -17,12 +17,15 @@ public: /// Constructor, which is used to define the hardware + /// + /// The default parameters are based on the mbed LPC1768 micro, which has + /// AnalogOut on p18 and uses a 3.3v supply for the A/D reference. /// /// @param[in] aout is the analog output pin /// @param[in] minV is based on the A/D low reference voltage (default 0.0) - /// @param[in] maxV is based on the A/D high reference voltage (default 3.0) + /// @param[in] maxV is based on the A/D high reference voltage (default 3.3) /// - SignalGenDAC(PinName aout, float minV = 0.0, float maxV = 3.0); + SignalGenDAC(PinName aout = p18, float minV = 0.0, float maxV = 3.3); /// Destructor /// @@ -59,6 +62,10 @@ private: bool isOn; // tracks whether the signal is on or off AnalogOut * aout; + float frequency; // signal parameters + float dutycycle; + float voltage; + float offset; float minV; // Based on the A/D hardware float maxV; // Based on the A/D hardware /// range limit a value.