Sin wave generation class using D/A converter(LPC1768)
Dependents: agic_touch_panel_v3
Diff: Sinwave.h
- Revision:
- 0:e934e95962bd
diff -r 000000000000 -r e934e95962bd Sinwave.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Sinwave.h Tue Jun 24 04:44:48 2014 +0000 @@ -0,0 +1,17 @@ +#ifndef SINWAVE_H_ +#define SINWAVE_H_ +#include"mbed.h" + +class Sinwave{ + public: + Sinwave(PinName DAport,float amplitude,float frequency); + void start(); + void stop(); + private: + void update(); + float outputs_[10]; + float cycle_; + Ticker output_int_; + AnalogOut DAport_; +}; +#endif \ No newline at end of file