Radio alarm clock

26,784

Radio alarm clock
Radio alarm clock

The program utilizes the built-in analog-to-digital (AD) converter of the PIC16F874 microcontroller for sensing touch buttons. The PIC features eight AD ports, with seven designated for the touch buttons and one for light measurement. To receive DCF signals, a DCF module (e.g., Conrad part number 641138 - 89) must be added, which outputs a digital TTL level DCF signal interpreted by the software to automatically adjust the time. When using the Conrad module, pin 1 connects to ground, pin 2 connects to +5VDC, and pin 3 (DCF-out) connects to pin 6 of the PIC. The LCD backlight can be dimmed either manually or automatically, based on ambient light levels. This is achieved using a light-dependent resistor (LDR) as a light sensor, in conjunction with the pulse-width modulation (PWM) capabilities of the microprocessor.

The circuit design incorporates a PIC16F874 microcontroller, which serves as the central processing unit for handling input from touch buttons and processing DCF time signals. The microcontroller's eight AD ports facilitate the connection of seven touch buttons and one LDR for light measurement. Each touch button is connected to an individual AD port, allowing for precise analog readings that correspond to user interactions.

The integration of the DCF module is crucial for time synchronization. The module outputs a digital signal, which is received by the microcontroller on pin 6. The connections are straightforward: the ground pin of the DCF module connects to the system ground, the power pin connects to a +5V supply, and the DCF-out pin provides the time signal to the microcontroller. This setup allows the software to interpret the DCF signal and adjust the internal clock of the PIC accordingly.

For the LCD backlight control, the LDR is placed in a voltage divider configuration with a fixed resistor, allowing the microcontroller to measure the voltage across the LDR. The PWM functionality of the PIC16F874 is employed to adjust the brightness of the LCD backlight based on the voltage reading from the LDR. This creates an adaptive lighting system that enhances visibility in varying ambient light conditions, improving user experience.

Overall, this design effectively combines touch sensing, timekeeping, and adaptive lighting into a cohesive system, leveraging the capabilities of the PIC16F874 microcontroller and external components to create a responsive and user-friendly interface.The program makes use of the built-in AD converter of the PIC16F874 for sensing the touch buttons. The PIC has 8 AD ports, seven are used for the 7 touch-buttons, 1 is used for the light measurement. In order to receive DCF signals, you have to add a DCF module (e. g. Conrad nr. 641138 - 89) which will provide a digital TTL level DCF signal which i s than interpreted by the software to automatically adjust the time. If you use the Conrad module, pin 1 of this module goes to ground, pin 2 to +5VDC and pin 3 (DCF-out) to pin 6 of the PIC. The backlight of the LCD can be dimmed either manually or automatically, proportional to the ambient light.

This is done using an LDR as a light sensor and the PWM capability of the microprocessor. 🔗 External reference