To Generate the 50 Hz SINE PWM using look up table in TMS320F2812 KIT.
Pulse Width Modulation(PWM), is a commonly used technique for controlling power to inertial electrical devices, made practical by modern electronic power switches.
In TMS320F2812 kit, The F2812 processor core have an Event Manager to generate the PWMs. The Core has a 2 Event manager, EVA & EVB. Up to eight PWM waveforms (outputs) can be generated simultaneously by each event manager. So, totally 16 PWMs get at F2812 processor Which is more than enough to control a five phase device control. EV have certain Registers to perform.
There are two GP timers in each EV module. The GP timer x (x = 1 or 2 for EVA, x = 3 or 4 for EVB) includes
These four registers are very important and needed to generate the pwm., some more register(GPTCONA, DBTCONA, COMCONA, ACTRA, CMPR1, CMPR2, CMPR3, CAPCONA) are available to Control the PWM.
Example: Calculating the period value for 1 Khz pwm
SYSCLKOUT = 125 Mhz
HISPCP – 2
TPS – 1 (Load the TPS Value in T1con register).
TIPWM – 1000 (1 khZ).
T1PR = F424; for 1 Khz period value.
T1CMPR = 7A12.(50 % Duty Cycle)
Sinusoidal pulse width modulation is a method of pulse width modulation used in inverters. An inverter produces an AC output voltage from a DC input by using switching circuits to simulate a sine wave by producing one or more square pulses of voltage per half cycle. If the widths of the pulses are adjusted as a means of regulating the output voltage, the output is said to be pulse width modulated.
With sinusoidal or sine weighted pulse width modulation, several pulses are produced per half cycle. The pulses near the edges of the half cycle are always narrower than the pulses near the center of the half cycle such that the pulse widths are proportional to the corresponding amplitude of a sine wave at that portion of the cycle. To change the effective output voltage, the widths of all pulses are increased or decreased while maintaining the sinusoidal proportionality. With pulse width modulation, only the widths (on-time) of the pulses are modulated. The amplitudes (voltage) during the "on-time" is constant unless a multi-step circuit is used. The line-to neutral voltage of a 3-phase inverter has two voltage levels.
Note: Once you install the Code Composer Studio v 3.3 software, the two icons will display in desktop
1. Open Setup Code Composer Studio v3.3.
2. In System Configuration, select the board then → Remove all → yes
Note: The above two steps only for first time to setup the processor in CCS.
3. Open Code Composer Studio v3.3.
4. Project → New.
5. File → New → Source file.
6. File → Save.
Paste the following two cmd files in our project folder.
8. Project → Add files to project.
9. Project → Build Option.
In compiler tab, select Preprocessor
In linker tab, select libraries
In linker tab, select Basic
10. Project → Build (or) Rebuild all.
11. Connections for TMS320F2812 KIT
12. Debug → connect.
13. File → Load Program → Browse and select the projectname.out file → open
14. Debug → Go main.
15. Debug → Run.
16. See the output at CRO by connecting probe positive terminal to (Port A) PWM pins & probe negative terminal to Ground.
17. Debug → Halt.
Thus, the 50Hz SPWM was generated using sine look up table in TMS320F2812 Kit.
we respect your privacy.