The circuit drives the LCD pins with 50% square waves. Each segment on this LCD is connected to the COM backplane and a separate pin. When a pin is driven in phase with the COM pin, the corresponding LCD segment gets zero voltage, and is off. When a pin is driven in reverse of the COM pin, the corresponding segment gets an alternating voltage, and lights up. The interrupt routine is called periodically to invert all pins of the LCD to generate the 50% square wave. The pin states are stored in the RAM labeled segments_buffer, 5 bytes long. The interrupt also reads the temperature sensor for the actual values. The main program gets the temperature value from tc77_ioread, and calculates the temperature in celsius. All digits of this decimal value are then converted into the values of the 7 segment of the LCD digits. This mapping table is located at the label segtable. For example, the digit 0 turn on the following digits: F, E, D, C, B, A because it sets bits as `00111111`.
Click here to download the full size of the above Circuit.
The 16 possible fraction values at the last digit are rounded and mapped to the last digit at the "lookup_frac" table.
When the digits in all positions are updated, the "convert_segments" subroutine will map all the segments into the output pins of the PIC. For example, segment A of the first digit, called 1A is mapped to the RD6 pin of the PIC.
part number description
IC1 PIC16F871 Microchip microcontroller
IC2 TC77 Microchip digital temperature sensor
LCD1 7-segment 3? digit LCD
Q1 4MHz crystal
C1, C2 15pF ceramic capacitor
C3 100nF/6V ceramic capacitor
S1 ON/OFF switch
BAT1 CR2032 socket and Lithium battery
misc Printed Circuit Board (PCB), strip board or bread-board
housing for the electronics
This project fits more for custom made battery casing that can have more space to hide things inside. This switch with few alterations can be used for any other project as well but is designed based on e-bike needs! This project use a clever functionality of....
The circuit described here uses ultrasonic oscillations and operates based on the propagation velocity of these oscillations in the air. Thus, we can easily determine the distance of two points if the time within which the wave travels this distance is....
Sometimes the precious metals are hidden too deep and are not detected except with complicated devices. In many cases, however, small pieces of precious metal buried near the surface can be detected by relatively simple means. Everyone is very attractive to....
Many times for various reasons we forget or can not water the plants that we have in our homes. And many humidity sensors units just notify us with a beeping sound or with a flashing light, that the pot needs watering. But what if we are away from home? This....
The principle behind a metal detector is really very simple. Proof of this is the circuit that follows, in which it proves that the construction of a metal detector can be done in the minute, with few components that we find very easily everywhere. With the....
The sub-harmonic bass generator is a sound producing unit for guitars. The sound it produces looks very much like that of the bass guitar. The octave generator is sometimes quite unusual since it does not produce any of the usual ways of coloring the sound,....
In the past the sounding (sea bottom measurement) was done with the "bullet", that is, with a heavy lead object that the seamen plucked into the sea hung from a calibrated rope. As soon as the "bullet" reached the bottom, the depth appeared directly from the....
This Amplifier was designed to have the following specifications: Distortion less than 0.1% at full power of 100W even at 20KHz. Power has to be attributed to an extended bandwidth. The output transistors must be protected against short circuits. The power....
A series of LEDs serve to alert the gardener when plants need water. Using two conventional digital integrated LEDs and a series of LEDs, we make a very useful device for gardening. The device detects the amount of water in the pot and alerts the grower.....
characters left: