Summary of PIC 16F88 Microcontroller PIC based Tengu
Tengu is a sound-responsive smiley display using a Microchip PIC16F88. It reads amplified audio via an A/D converter, changes facial expressions based on sound intensity, and shifts from happy to sad and then sleep after silence; gentle blowing wakes it. A directly driven multiplexed 7-row LED matrix uses Timer0 (~1 ms) for row switching (persistence of vision) and Timer1 to track silence duration. Project code is in C with MPLAB and Hi-Tech C compiler v9.80.
Parts used in the Tengu:
- Microchip PIC16F88 microcontroller
- 2N3904 transistor (pre-amplifier)
- Pre-amplifier circuit components (resistors, capacitors as required)
- Analog input connection to RB7/AN6 (pin 13)
- 7-row LED dot matrix display
- Timer0 and Timer1 hardware within PIC16F88 (configured in firmware)
- Power supply components (regulator, decoupling capacitors)
- Blow/wake sensor realized via microphone input
- MPLAB IDE and Hi-Tech C compiler v9.80 (software tools)
Tengu derives its name from a mythical Japanese creature known for getting into mischief. Our Tengu, however is more earthly in nature. It responds to voice and sounds and takes on different facial features depending on the intensity of the sound. If no sound is heard for some time, it changes from a happy face to a sad face and then goes to sleep. Gently blowing on his face wakes him back up to his usual happy self.
The project is based on a Microchip PIC 16F88 which is part of their mid range of microcontrollers. The sound is amplified through a pre-amp circuit based on 2N3904 and fed to the RB7/AN6 (pin 13) of the pic microcontroller. The A/D converter on the microcontroller is used to convert the analog signal from the pre-amp. The LED Matrix is directly driven by the pic. In order to be able to display the entire smiley, the LED dot matrix is multiplexed in such a way that only one row out of the seven is active at any given time. However the rows are turned on and off so rapidly, the human eye sees it as a full picture. This effect is called the persistence of vision.

For more detail: PIC 16F88 Microcontroller PIC based Tengu
- What microcontroller is used in the Tengu project?
The project uses a Microchip PIC16F88 microcontroller. - How does Tengu detect sound?
Sound is amplified through a pre-amplifier based on a 2N3904 and fed to the PIC's RB7/AN6 analog input. - Does Tengu use the PIC's A/D converter?
Yes, the PIC's A/D converter converts the analog signal from the pre-amplifier. - How is the LED matrix driven?
The LED dot matrix is directly driven by the PIC and multiplexed so one of seven rows is active at a time. - What creates the full-picture effect on the LED matrix?
Persistence of vision from rapid row switching creates the perception of a full picture. - Which timer is used for multiplexing the LED rows?
Timer0 is used with approximately 1 ms timeouts to switch the active LED row. - Which timer tracks silence to change expressions?
Timer1 is configured as a general purpose timer to track time since noise above threshold was heard. - What happens when no sound is heard for some time?
The smiley changes from a happy face to a sad face and then goes to sleep. - How is Tengu woken from sleep?
Gently blowing on its face (detected via the microphone input) wakes it back to a happy face. - What development tools were used to write the code?
Code was written in C using MPLAB and the Hi-Tech C compiler version 9.80.
