![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
2011
Diff: setting.h
- Revision:
- 231:30896263bd8b
- Parent:
- 229:27eca07c9591
- Child:
- 232:e9c5ec04e378
--- a/setting.h Thu Apr 07 06:18:38 2022 +0000 +++ b/setting.h Mon Jun 13 08:48:55 2022 +0000 @@ -2,17 +2,25 @@ #include "FastPWM.h" // pwm -#define PIN_V PB_7 -#define PIN_W PB_6 +//#define PIN_V PB_4 +//#define PIN_W PB_5 +//#define PIN_V PC_6 +//#define PIN_W PC_7 +#define PIN_V PA_8 +#define PIN_W PA_7 +//#define PIN_V PB_6 +//#define PIN_W PB_7 //#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 PWM_ARR 0xAFC8 // loop 2 k, pwm 1k -#define TMR3_COUNT 0xAFC8 // loop 2 k, pwm 1k +//#define TMR3_COUNT 0xAFC8 // loop 2 k, pwm 1k +#define TMR3_COUNT 0x1194 //#define TMR2_COUNT 0x2710 // loop 500hz with prescale 18 #define TMR2_COUNT 0x4650 // loop 5 k +#define TMR1_COUNT 0x1194 #define FREQ_500 500.0f #define FREQ_1k 1000.0f @@ -31,19 +39,12 @@ #define TMR_FREQ_5k 5000 #define TMR_FREQ_1k 1000 -extern DigitalOut check; -extern DigitalOut check_2; extern AnalogOut dac_1; extern AnalogOut dac_2; extern float dtc_v; extern float dtc_w; -// I2C -extern I2C i2c; // SDA, SCL (for K22F) -extern const int i2c_slave_addr1; -extern unsigned int value; // 10bit output of reading sensor AS5510 - // SPI extern SPI eeprom; //(SPI_MOSI, SPI_MISO, SPI_SCK); extern DigitalOut eeprom_cs; @@ -329,7 +330,6 @@ extern int DZ_NUM; extern int one_period_end; extern float Ref_Vel_Test; -extern long TMR2_FOR_SLOW_LOGGING; //extern int velcount; extern char max_check; extern char min_check;