• 大小: 7KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-05-06
  • 语言: 其他
  • 标签: STM32  SPWM  

资源简介

可以用于逆变交流电的产生,也可以用于三相电的产生,希望能对大家有所帮助。

资源截图

代码片段和文件信息

#include “spwm.h“
#include “sys.h“
#include “stm32f10x_tim.h“
#include 
#define pfreq 40000   //频率
#define psc 1      //预分频系数,低的话分辨率高
u8 pfreq0=60; 
float dutyS=0.85;//输出交流的电压系数
const u16 spwm[400]={



//0x40000x41010x42020x43030x44040x45050x46050x47050x48050x4904
//0x4A030x4B000x4BFE0x4CFA0x4DF60x4EF00x4FEA0x50E30x51DA0x52D1
//0x53C60x54BB0x55AD0x569F0x578F0x587D0x596A0x5A560x5B3F0x5C27
//0x5D0E0x5DF20x5ED50x5FB50x60940x61700x624A0x63230x63F90x64CC
//0x659E0x666D0x67390x68030x68CB0x69900x6A520x6B120x6BCF0x6C89
//0x6D410x6DF50x6EA70x6F560x70010x70AA0x71500x71F20x72910x732E
//0x73C60x745C0x74EE0x757D0x76090x76910x77160x77970x78150x788F
//0x79060x79790x79E80x7A540x7ABC0x7B200x7B810x7BDE0x7C370x7C8C
//0x7CDE0x7D2B0x7D750x7DBB0x7DFD0x7E3B0x7E750x7EAB0x7EDD0x7F0C
//0x7F360x7F5C0x7F7E0x7F9D0x7FB70x7FCD0x7FDF0x7FED0x7FF70x7FFD
//0x80000x7FFD0x7FF70x7FED0x7FDF0x7FCD0x7FB70x7F9D0x7F7E0x7F5C
//0x7F360x7F0C0x7EDD0x7EAB0x7E750x7E3B0x7DFD0x7DBB0x7D750x7D2B
//0x7CDE0x7C8C0x7C370x7BDE0x7B810x7B200x7ABC0x7A540x79E80x7979
//0x79060x788F0x78150x77970x77160x76910x76090x757D0x74EE0x745C
//0x73C60x732E0x72910x71F20x71500x70AA0x70010x6F560x6EA70x6DF5
//0x6D410x6C890x6BCF0x6B120x6A520x69900x68CB0x68030x67390x666D
//0x659E0x64CC0x63F90x63230x624A0x61700x60940x5FB50x5ED50x5DF2
//0x5D0E0x5C270x5B3F0x5A560x596A0x587D0x578F0x569F0x55AD0x54BB
//0x53C60x52D10x51DA0x50E30x4FEA0x4EF00x4DF60x4CFA0x4BFE0x4B00
//0x4A030x49040x48050x47050x46050x45050x44040x43030x42020x4101
//0x40000x3EFE0x3DFD0x3CFC0x3BFB0x3AFA0x39FA0x38FA0x37FA0x36FB
//0x35FC0x34FF0x34010x33050x32090x310F0x30150x2F1C0x2E250x2D2E
//0x2C390x2B440x2A520x29600x28700x27820x26950x25A90x24C00x23D8
//0x22F10x220D0x212A0x204A0x1F6B0x1E8F0x1DB50x1CDC0x1C060x1B33
//0x1A610x19920x18C60x17FC0x17340x166F0x15AD0x14ED0x14300x1376
//0x12BE0x120A0x11580x10A90x0FFE0x0F550x0EAF0x0E0D0x0D6E0x0CD1
//0x0C390x0BA30x0B110x0A820x09F60x096E0x08E90x08680x07EA0x0770
//0x06F90x06860x06170x05AB0x05430x04DF0x047E0x04210x03C80x0373
//0x03210x02D40x028A0x02440x02020x01C40x018A0x01540x01220x00F3
//0x00C90x00A30x00810x00620x00480x00320x00200x00120x00080x0002
//0x00000x00020x00080x00120x00200x00320x00480x00620x00810x00A3
//0x00C90x00F30x01220x01540x018A0x01C40x02020x02440x028A0x02D4
//0x03210x03730x03C80x04210x047E0x04DF0x05430x05AB0x06170x0686
//0x06F90x07700x07EA0x08680x08E90x096E0x09F60x0A820x0B110x0BA3
//0x0C390x0CD10x0D6E0x0E0D0x0EAF0x0F550x0FFE0x10A90x11580x120A
//0x12BE0x13760x14300x14ED0x15AD0x166F0x17340x17FC0x18C60x1992
//0x1A610x1B330x1C060x1CDC0x1DB50x1E8F0x1F6B0x204A0x212A0x220D
//0x22F10x23D80x24C00x25A90x26

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件          72  2019-08-02 00:11  说明.txt
     目录           0  2019-08-02 00:12  SPWM\
     文件       18150  2018-07-23 15:28  SPWM\spwm.c
     文件         148  2017-08-01 15:01  SPWM\spwm.h

评论

共有 条评论