sompong-tungmepol: การต่อมอเตอร์สามเฟสกับอินเวอร์เตอร์ : // DDS Sine Generator 3 phase ATMEGA 168 328P PWM 4KHZ + Danijel Gorupec, 2015 // Support 7 Segments Show Hz 15/07/2017 // Import SevSeg L...#include"avr/io.h" //Arduino 1280 2560 good version 101-106 3sine very goog #define cbi(sfr,bit)SFR_BYTE(sfr)&=_BV(bit) #define sbi(sfr,bit)SFR_BYTE(sfr)| =_BV(bit) #define UN (400.0) // motor rated voltage #define FN (50.0) // motor nominal frequency #define P (UN/FN) // associate Determining the ratio of voltage to nominal frequency #define T_PWM (0.000255) // PWM signal period - set by the prescaler in the counters #define T_MAX (4.0) // Specify the maximum output voltage period #define T_MIN (0.02) // minimum output voltage #define K_MAX floor (T_MAX/T_PWM) // number of period values for T_MAX #define K_MIN ceil (T_MIN/T_PWM) // number of period values for T_MIN volatile static unsigned int length_tab_sin; // variable containing the number of values in the full // period...
ความคิดเห็น
แสดงความคิดเห็น