Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 3:0f818374b9b5, committed 2015-01-20
- Comitter:
- frada
- Date:
- Tue Jan 20 16:07:16 2015 +0000
- Parent:
- 2:7a0e156f2cc8
- Commit message:
- -
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Jan 20 15:08:36 2015 +0000
+++ b/main.cpp Tue Jan 20 16:07:16 2015 +0000
@@ -6,8 +6,8 @@
#define SCLK PTD1
#define CS PTD0
#define CONVST PTD5
- #define BUSY PTD4
- #define RESET ???
+ #define BUSY PTA13
+ #define RESET PTC9
#elif defined(TARGET_K64F)
#define MISO PTD3
#define SCLK PTD1
@@ -21,7 +21,7 @@
Serial pc(USBTX, USBRX);
AD7606 ad7606(MISO, SCLK, CS, CONVST, BUSY, RESET, 100000);
double aValues[8] = {0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F};
-//uint16_t rawValues[8] = {0, 0, 0, 0, 0, 0, 0, 0};
+//int16_t rawValues[8] = {0, 0, 0, 0, 0, 0, 0, 0};
Ticker tick1;
DigitalOut greenLED(LED_GREEN);
volatile bool timerInterrupt = false;
@@ -43,7 +43,7 @@
//ad7606.readRAW(rawValues);
//pc.printf("%d, %d, %d, %d, %d, %d, %d, %d\r\n", rawValues[0], rawValues[1], rawValues[2], rawValues[3], rawValues[4], rawValues[5], rawValues[6], rawValues[7]);
ad7606.readAnalog(aValues);
- pc.printf(".3f, .3f, .3f, .3f, .3f, .3f, .3f, .3f\r\n", aValues[0], aValues[1], aValues[2], aValues[3], aValues[4], aValues[5], aValues[6], aValues[7]);
+ pc.printf("%.3f, %.3f, %.3f, %.3f, %.3f, %.3f, %.3f, %.3f\r\n", aValues[0], aValues[1], aValues[2], aValues[3], aValues[4], aValues[5], aValues[6], aValues[7]);
timerInterrupt = false;
}
}