![](http://datasheet.mmic.net.cn/Rabbit-Semiconductor/101-1007_datasheet_95644/101-1007_32.png)
24
PowerCore FLEX
3.2.6 Triacs
The following sample programs can be found in the SAMPLES\PowerCoreFLEX\TRIAC
folder.
3.2.6.1 Phase-Angle Triac Control
The sample programs demonstrate phase-angle triac control for the PowerCore module
and its Prototyping Board. Phase-angle triac control provides you with the ability to fire a
triac at a given phase angle of a 50/60 Hz sine wave to provide the desired control for your
hardware application.
Once one of the following sample programs is compiled and is running, select the desired
triac and the phase angle of where to fire the selected triac 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 control pin going active at the phase angle from 0 to 180
that 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 7 (ramping triacs) from the Dynamic C STDIO window to monitor the lamps
visually.
DS1—PF2_SCR-0
DS2—PF3_SCR-1
You should see lamps go from being fully ON, then dimming down to fully OFF.
TRIAC_PHASE.c
—This program demonstrates basic phase-angle triac control.
TRIAC_PHASE_ADC.c
—This program demonstrates phase-angle triac control and
reading the A/D ramp circuit when you use the PowerCore module and its Prototyping
Board. 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_PHASE_FLASH.c
—This program demonstrates phase-angle triac control by
writing to the flash memory (but not the serial flash memory).