![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
dac subsystem
main.cpp@0:c7adfe979a5b, 2014-04-01 (annotated)
- Committer:
- dzl5187
- Date:
- Tue Apr 01 04:45:24 2014 +0000
- Revision:
- 0:c7adfe979a5b
first commit;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dzl5187 | 0:c7adfe979a5b | 1 | #include "mbed.h" |
dzl5187 | 0:c7adfe979a5b | 2 | #include "log.h" |
dzl5187 | 0:c7adfe979a5b | 3 | #include "DAC.h" |
dzl5187 | 0:c7adfe979a5b | 4 | #include "mcp4725.h" |
dzl5187 | 0:c7adfe979a5b | 5 | Timer programTimer; |
dzl5187 | 0:c7adfe979a5b | 6 | //Timer DACC_timer; |
dzl5187 | 0:c7adfe979a5b | 7 | //DigitalOut testLed(LED1); |
dzl5187 | 0:c7adfe979a5b | 8 | |
dzl5187 | 0:c7adfe979a5b | 9 | int main() |
dzl5187 | 0:c7adfe979a5b | 10 | { |
dzl5187 | 0:c7adfe979a5b | 11 | |
dzl5187 | 0:c7adfe979a5b | 12 | DAC_set(3.0, FREQ_1HZ, FORM_SQUARE); |
dzl5187 | 0:c7adfe979a5b | 13 | DAC_start(); |
dzl5187 | 0:c7adfe979a5b | 14 | while(1) { |
dzl5187 | 0:c7adfe979a5b | 15 | DAC_generate(); |
dzl5187 | 0:c7adfe979a5b | 16 | } |
dzl5187 | 0:c7adfe979a5b | 17 | |
dzl5187 | 0:c7adfe979a5b | 18 | |
dzl5187 | 0:c7adfe979a5b | 19 | } |