The code in mikroC PRO for the PIC16F887 microcontroller is designed to operate with an 8.000 MHz clock frequency on a Microchip 44-pin demo board. The routines have been developed using HITECH C, but the focus is on utilizing mikroC PRO due to the availability of the programmer and software from mikroE. Assistance is sought in implementing the internal oscillator to control the speed of running LEDs on one of the ports, with direction switching facilitated by a micro switch. This project aims to enhance understanding of the internal clock control of the microcontroller and other functionalities.
The PIC16F887 microcontroller is a versatile device featuring a 14-bit instruction set architecture, suitable for a wide range of applications. Operating at an 8.000 MHz clock frequency allows the microcontroller to perform various tasks efficiently. In this design, the internal oscillator is utilized to generate the necessary clock signal, which simplifies the circuit by eliminating the need for external clock components.
The microcontroller's GPIO (General Purpose Input/Output) pins can be configured to drive LEDs, providing visual feedback on the program's execution. Each LED can be connected to a specific port pin, allowing individual control over their states. The speed at which the LEDs are turned on and off can be adjusted by modifying the timing parameters in the code, which directly influences the delay between state changes.
The implementation of a micro switch introduces an interactive element to the circuit. This switch can be connected to another GPIO pin configured as an input. When the switch is activated, it can trigger a change in the LED behavior, such as reversing the direction of the LED sequence or altering the speed of the flashing pattern. This feature not only enhances user engagement but also serves as a practical exercise in handling input devices with the microcontroller.
The code written in mikroC PRO should include initialization routines for setting up the internal oscillator, configuring the GPIO pins as outputs for the LEDs, and setting up the input pin for the micro switch. A main loop will continuously check the state of the switch and update the LED states accordingly. Proper debouncing techniques should be employed to ensure reliable switch operation.
In summary, this project serves as an educational platform for understanding the operation of the PIC16F887 microcontroller, particularly focusing on the internal oscillator's control and the interaction between input and output devices. The implementation of the LED control and micro switch functionality provides a solid foundation for further exploration of embedded systems.The code in mikroC PRO for PIC16F887, with 8. 0000 MHz clock for microchip 44 pin Demo board, the routines have been written from microchip in HITECH C, since I am working and have programmer and software from mikroE I am interested to go with that only, instead of running around. If any body will help me for that, they used internal oscillator to control the speed of the running leds on one of the ports and the direction is switching with the help of one micro swith. This all I wand in mikroC PRO. , that will help me in learning the use and control of the internal clock of the MCU and other things as well.
This circuit can be programmed for a gain of 0, -1, -2, -4, or -8. This could also be accomplished with one input resistor and one feedback resistor per channel in the conventional manner, but this would require eight...
This project demonstrates the use of an ATTiny microcontroller and an RGB LED to create a light that continuously cycles through random colors, with the ability to change color dramatically at the press of a switch. The inspiration for...
Early in the exploration of high-power LEDs, such as the Luxeon 1 and 3-watt devices, the potential of Pulse Width Modulation (PWM) techniques for LED modulation was considered. This method theoretically minimizes distortion by making the LED's "Current versus...
LEDs lining the headliner will fade in when the door is opened and fade out when the door is closed. The necessary components include a circuit to utilize 12V power from the vehicle to illuminate 15 LEDs and control...
This ultra-bright white LED lamp operates on 230V AC with minimal power consumption. It is suitable for illuminating VU meters, SWR meters, and similar applications. Ultra-bright LEDs available in the market are priced between Rs 8 to 15. These...
This is a programmable clock timer circuit that utilizes individual LEDs to indicate hours and minutes. Twelve LEDs are arranged in a circle to represent the 12 hours of a clock face, while an additional 12 LEDs are positioned...
We use cookies to enhance your experience, analyze traffic, and serve personalized ads.
By clicking "Accept", you agree to our use of cookies.
Learn more