This AVR microcontroller project demonstrates how to generate two square pulses with a 5 kHz frequency, each with a 90-degree phase difference. These square pulses can be used for various applications, such as motor control, signal processing, or synchronization purposes.
- AVR microcontroller (e.g., ATmega series)
- Crystal oscillator (if required for accurate frequency generation)
- Jumper wires
- Power source for the AVR microcontroller
- AVR-GCC or a compatible C/C++ compiler
- AVRDUDE or a suitable programming software for uploading firmware
- AVR Studio or a preferred IDE for programming and debugging
- Clone this repository to your local machine using
git clone
. - Connect your AVR microcontroller to your development board or circuit.
- Compile the source code using your preferred AVR-GCC or IDE.
- Upload the compiled binary to the AVR microcontroller using AVRDUDE or your chosen programmer.
- Make the necessary hardware connections between your AVR microcontroller and the output pins (PD4 and PD5) where you want to generate the square pulses.
- Load the compiled binary onto the AVR microcontroller.
- Power up the AVR microcontroller and observe the two square pulses with a 5 kHz frequency and a 90-degree phase difference on PD4 and PD5.
You can modify the source code to customize the frequency, phase difference, or other parameters to suit your project's requirements.
If you would like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and ensure they work as expected.
- Submit a pull request, describing the changes you've made.
Feel free to contact me via email: t.morovati.99@gmail.com