All 68HC05 devices have some number of pins, either dedicated or shared with other peripherals, that can be used as digital inputs and outputs. The partial circuit for the smart light dimmer, shown above, illustrates two useful features available on the I/O pins of the MC68HRC705KJ1.
In order to directly drive LEDs, or in this circuit, the gate control of a triac, many 68HC05 devices, including the MC68HRC705KJ1, have outputs with low side current sink capability of 10 mA or more.
The inputs on some 68HC05 devices can optionally be used as active high interrupt request lines. This is the case with the four low order bits of port A on the MC68HRC705KJ1.
In the example above, negative and positive zero crossings of the AC line voltage are detected by using the IRQ external interrupt pin and the optional port A interrupt capability, respectively.
Fade in and fade out of the light bulb (initiated by touch sensors connected to other inputs not shown in this diagram) are accomplished by using the MC68HRC705KJ1 multifunction timer to vary the delay between each zero crossing and MCU-controlled firing of the triac.