User’s Manual
25
3.2.6.2 Time-Proportional Triac Control
The sample programs demonstrate time-proportional triac control for the PowerCore mod-
ule and its Prototyping Board. Time-proportional triac control provides you with the abil-
ity to control a triac over a fixed number of 50/60 Hz cycles. By setting the triac ON/OFF
ratio you will be able to achieve the desired control for your hardware application.
Once one of the following sample programs is compiled and is running, set the ON/OFF
ratio of and select the triac as prompted in the Dynamic C STDIO window.
You may use an oscilloscope or some other load circuit such as the incandescent lamps
provided in the Tool Kit to monitor the output. If you are using an oscilloscope, monitor
the triac control pin to see the triacs cycle according to the ON/OFF ratio you selected.
The control pins are located on header J4 of the Prototyping Board:
Pin 41—PF2_SCR-0
Pin 40—PF3_SCR-1
If you are not using an oscilloscope, solder in the incandescent lamps provided in the Tool
Kit at DS1 and DS2 on the Prototyping Board before running any of these sample programs.
Select option 1 (ramping triacs) from the Dynamic C STDIO window to monitor the lamps
visually.
DS1—PF2_SCR-0
DS2—PF3_SCR-1
TRIAC_RATIO.c
—This program demonstrates basic time-proportional triac control.
TRIAC_RATIO_ADC.c
—This program demonstrates time-proportional triac control
and reading the A/D ramp circuit when you use the PowerCore module and its Proto-
typing Board.
If you installed the incandescent lamps, you should see the lamps cycle ON/OFF
according to the ON/OFF ratio you selected. When you first activate the lamps, DS2
will blink twice as fast as DS1.
The Dynamic C STDIO window will show the A/D ramp output voltages for the 2.5 V
reference voltage, the end-of-ramp-voltage, and the thermistor.
TRIAC_RATIO_FLASH.c
—This program demonstrates time-proportional triac control
by writing to the flash memory (but not the serial flash memory).
When you run this sample program, you will be able to monitor the triacs cycling OFF
and ON, incrementing automatically over ratio ranges of 0/5 (= OFF) to 5/5 (= ON,
either DS1 or pin 41 of Prototyping Board header J4) and 0/10 (= OFF) to 10/10 (= ON,
either DS2 or pin 40 of Prototyping Board header J4).