Description: 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 segments of the LCD digits. This mapping table is located at the label segtable. For example, the digit 0 turns on the following digits: F, E, D, C, B, A because it sets bits as "00111111". More: 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
The described circuit operates a 3-digit 7-segment LCD display using a PIC16F871 microcontroller. The LCD segments are controlled by generating 50% duty cycle square waves, allowing for efficient multiplexing of the display. Each segment is connected to a common backplane (COM) and individual pins, enabling the display of numerical values based on the temperature readings from the TC77 temperature sensor.
The interrupt routine is critical for inverting the states of the LCD pins, which alternates the segments' display states to create the illusion of continuous illumination. The segments' states are maintained in a 5-byte buffer in RAM, named `segments_buffer`, which stores the on/off states for each segment.
Temperature readings are obtained through the `tc77_ioread` function, with the results processed to convert the temperature value into a decimal representation. This value is then mapped to the corresponding segments of the LCD using a predefined mapping table, `segtable`, which specifies the bit patterns required to illuminate the correct segments for each digit. For instance, the digit '0' corresponds to the bit pattern "00111111", which activates segments A through F.
To enhance the display's accuracy, the last digit can represent fractional values, which are rounded and mapped using the `lookup_frac` table. This allows for the display of temperature values with decimal precision.
The `convert_segments` subroutine is responsible for translating the segment states into the output pins of the PIC microcontroller, ensuring that each segment of the LCD is driven by the appropriate pin. For example, the pin RD6 is designated for segment A of the first digit.
The circuit is powered by a CR2032 lithium battery, providing a compact and portable power source. The components are assembled on a printed circuit board (PCB), strip board, or breadboard, with an ON/OFF switch (S1) for power control. The design includes a 4MHz crystal (Q1) for clock generation, along with ceramic capacitors (C1, C2, C3) for stability and filtering.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".
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
The temperature measuring range of this electronic thermometer is 0-50 degrees Celsius, with a precision of 0.1 degrees Celsius. The measurement results are intuitively displayed on a digital screen. This electronic thermometer circuit consists of a temperature detection circuit, a...
Digital Remote Thermometer. The remote sensor transmits data through the mains supply. The temperature range is from 0.0 to 99.9 °C. Transmitter circuit diagram includes the following components: R1, R3 = 100K 1/4W resistors; R2 = 47Ω 1/4W resistor; R4...
This is a simple square wave generator circuit constructed using the IC 74LS00, capable of producing square wave signals with frequencies ranging from 20 Hz to 1 MHz. The circuit exhibits sufficient stability for most applications. The output frequency is...
This circuit serves as an ultra-low power replacement for multiple LED on-off indicators. It also has the advantage of being easy to read in full daylight. With the parts shown, it is possible to display four bits of information. The...
The communication technique with the LCD is similar to the previous lesson. In this experiment, a counter that counts from 0000 to 9999 has been added. The counter increments with a 1-second delay. The communication with the LCD will be...
This design circuit is for a temperature sensor that utilizes an LM335 integrated circuit (IC) to convert ambient temperature into an equivalent output voltage. The output voltage of the LM335 increases by approximately 10 mV for every 1 degree Kelvin...
The LM35 temperature sensor provides an output of 10 mV/°C for every degree Celsius over 0°C. At 20°C, the output voltage is 20 x 10 = 200 mV. The circuit consumes 60 µA. The load resistance should not be less...
Related components PDF download: ICL7106CD4036. The LCD electronic thermometer circuit is illustrated. The temperature sensor KTY10 exhibits a strong linear relationship between temperature and resistance. Points A and B (Measurement display circuit) can be connected with a 100-meter wire. The...
An 8-channel temperature detection circuit capable of monitoring eight different temperature sensors. The D581 serves as a 10.00V precision reference voltage source, providing a stable reference level for the detection circuit. Resistors RPi, RP2, and R4, along with the AD590L...
We use cookies to enhance your experience, analyze traffic, and (if you allow) serve personalized ads.
By clicking Accept All, you agree to our use of cookies.
Learn more