Sungwoo Kim
/
HydraulicControlBoard_Rainbow_v1_2_
rainbow
Diff: setting.h
- Revision:
- 2:a1c0a37df760
- Parent:
- 0:51c43836c1d7
- Child:
- 5:a4319f79457b
--- a/setting.h Mon Aug 19 08:05:09 2019 +0000 +++ b/setting.h Tue Aug 20 07:38:55 2019 +0000 @@ -1,18 +1,27 @@ #include "mbed.h" #include "FastPWM.h" +#define PI 3.141592 + extern DigitalOut check; extern DigitalOut check_2; extern AnalogOut dac_1; extern AnalogOut dac_2; // pwm -#define PIN_V PB_7 -#define PIN_W PB_6 -//#define PWM_ARR 0x465 // loop 80k, pwm 40k -#define PWM_ARR 0x8CA // loop 40k, pwm 20k -extern float dtc_v; -extern float dtc_w; +#define PIN_V PB_7 +#define PIN_W PB_6 +//#define PWM_ARR 0x465 // loop 80k, pwm 40k +//#define PWM_ARR 0x8CA // loop 40k, pwm 20k +#define PWM_ARR 0x1194 // loop 20k, pwm 10k +//#define PWM_ARR 0x2328 // loop 10k, pwm 5k + +#define FREQ_5k 5000.0 +#define FREQ_10k 10000.0 +#define FREQ_20k 20000.0 +#define FREQ_40k 40000.0 +extern double dtc_v; +extern double dtc_w; // I2C extern I2C i2c; // SDA, SCL (for K22F)