Class for AD7390, a 12 bit SPI driven external DAC from Analog Devices.
Datasheet - http://www.analog.com/static/imported-files/data_sheets/AD7390_7391.pdf
Revision 4:0c327b37ddc1, committed 2014-04-06
- Comitter:
- cassar10
- Date:
- Sun Apr 06 20:19:56 2014 +0000
- Parent:
- 3:37ec9ea72264
- Child:
- 5:1ce3ec1e5f8b
- Commit message:
- Working, add SPI frequency to setup and class can be finished.
Changed in this revision
| AD7390.h | Show annotated file Show diff for this revision Revisions of this file |
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/AD7390.h Sun Apr 06 20:07:38 2014 +0000
+++ b/AD7390.h Sun Apr 06 20:19:56 2014 +0000
@@ -11,9 +11,9 @@
void Reset();
void Latch();
void Init();
- private:
void Write(float Volts, float RefV);
void WriteL(float volts, float RefV);
+ private:
};
--- a/main.cpp Sun Apr 06 20:07:38 2014 +0000
+++ b/main.cpp Sun Apr 06 20:19:56 2014 +0000
@@ -7,18 +7,17 @@
int main(){
Test.Init();
+while (true){
+ Test.Reset();
+ Test.WriteL(2.5,3.3);
Led = 1;
- wait(1);
- Test.Latch();
+ wait(5);
+ Test.Reset();
Led = 0;
- wait (1);
-while (true){
-
- Test.Init();
+ Test.WriteL(1.5,3.3);
Led = 1;
- wait(1);
+ wait(5);
Led = 0;
- wait(1);
}