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.
Fork of FRDM-TFC by
Revision 7:b34924a05d60, committed 2014-04-20
- Comitter:
- redxeth
- Date:
- Sun Apr 20 00:14:53 2014 +0000
- Parent:
- 6:fbc2ba3c670a
- Child:
- 8:6cdfa332ec50
- Commit message:
- Updated SERVO_DEFAULT_PERIOD to be faster (10mS from 20mS) to permit racing.; ; Increase Clock period to compensate so integration time not impacted (from 100 cycles to 200 cycles)
Changed in this revision
| TFC.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/TFC.cpp Tue Apr 15 02:36:19 2014 +0000
+++ b/TFC.cpp Sun Apr 20 00:14:53 2014 +0000
@@ -1,11 +1,13 @@
#include "mbed.h"
#include "TFC.h"
-#define FTM1_CLK_PRESCALE 6// Prescale Selector value - see comments in Status Control (SC) section for more details
-#define SERVO_DEFAULT_PERIOD (float)(.020) // Desired Frequency of PWM Signal - Here 50Hz => 20ms period
+#define FTM1_CLK_PRESCALE 6 // Prescale Selector value - see comments in Status Control (SC) section for more details
+#define SERVO_DEFAULT_PERIOD (float)(.010) // Desired Frequency of PWM Signal - Here 50Hz => 20ms period
+#define TAOS_CLK_COUNT 200 // Number of cycles for CLK Signal on camera
+
// use these to dial in servo steering to your particular servo
#define SERVO_MIN_PULSE_WIDTH_DEFAULT (float)(.0005) // The number here should be be *pulse width* in seconds to move servo to its left limit
-#define SERVO_MAX_PULSE_WIDTH_DEFAULT (float)(.002) // The number here should be be *pulse width* in seconds to move servo to its left limit
+#define SERVO_MAX_PULSE_WIDTH_DEFAULT (float)(.002) // The number here should be be *pulse width* in seconds to move servo to its left limit
#define FTM0_CLOCK (SystemCoreClock/2)
@@ -801,7 +803,7 @@
TAOS_CLK_HIGH;
- for(Junk = 0; Junk<50; Junk++) {
+ for(Junk = 0; Junk<TAOS_CLK_COUNT/2; Junk++) {
}
TAOS_SI_LOW;
@@ -830,7 +832,7 @@
CurrentLineScanPixel++;
TAOS_CLK_LOW;
- for(Junk = 0; Junk<50; Junk++) {
+ for(Junk = 0; Junk<TAOS_CLK_COUNT/2; Junk++) {
}
TAOS_CLK_HIGH;
@@ -841,7 +843,7 @@
TAOS_CLK_HIGH;
- for(Junk = 0; Junk<50; Junk++) {
+ for(Junk = 0; Junk<TAOS_CLK_COUNT/2; Junk++) {
}
TAOS_CLK_LOW;
