| |||||||
Where to start programming AVR microcontrollers. Lesson 1In this tutorial avr I tried to describe the most basic for beginners programming microcontrollers avr. All the examples are built on the microcontroller atmega8. This means that for the repetition of all the lessons you need just one MK.![]() читать дальше >> "Hello World" on the microcontroller in ironIn the previous lesson we did hello worl emulator Proteusand in this tutorial we will do everything in iron. To repeat this lesson we will needчитать дальше >> Connection to a microcontroller seven-segment displayIn the previous lesson we have learned flashing led. This lesson slightly harder here we'll learn how to flash 7 LEDs. But not just seven LEDs, and segment indicator![]() читать дальше >> Lcd connection to the microcontroller AVRLearning to blink the led, you probably want to connect to the microcontroller something more meaningful, such as Lcd дисплей.Как do this? Yes it is, very simply. Character LCD display we подружим today with our old friends the ATmega8. For this we need to myself Lcd, I used symbols 16x2 LCD, and the atmega8 microcontroller.читать дальше >> How to connect to the microcontroller buttonsIn previous lessons I spoke about, as with the MK output information: connections seven-segment display and Lcd display . In this lesson we will enter the information using the buttons.![]() читать дальше >> Using the CPU in the AVR. Lesson 6Often the need to measure voltage. For these purposes, a microcontroller is ADC (analog-digital Converter). ADC is a device that converts an analog signal into a digital representation. The ADC input analog signal at the output we get is the equivalent of a digital signal.читать дальше >> Timers, counters microcontroller AVR (real time clock)When I was first learning microcontrollers, I wanted to make hour timer , to control AC load . Frankly , I wanted to try to include a TV with only 7 to 8 hours, and the rest of the time he had to be turned off. The device I did , but it did not apply...читать дальше >> Pulse Width Modulation (PWM, PWM). Lesson 8Probably , you do not just wondered how you can adjust the power of the consumer , for example to control the brightness of LED or adjust the engine speed . The easiest way - series with the load , such as LEDs, including the resistor , but he will bask and take precious energy and the high-power LEDs , the stronger will be our warm up resistor , this option is not for us. And what if the LED very quickly turn on and off , thus changing the length of inclusions at a constant rate ? For example, include LED 0.2 milliseconds every millisecond , the LED lights up , but not at full brightness . Similarly, with the engine - engine include 30 seconds every minute - then the engine spin up , but not at full speed - a relatively large weight of the rotor smooth out jerks from engaging the engine, and the resistance of friction it will slow down . Thus, the motor is spinning at half its capacity.читать дальше >> Data transfer via the UART AVR. Lesson 9 AVRMicrocontroller to communicate with his older brother - the PC - you can use the data interfaces , but since I'm training on AVR I try to build on the microcontroller mega8 , it is preferable to communicate with all PC use interface USART . No, you can certainly zayuzat USB, but USART in mega8 implemented in hardware , which means that we do not have to manually implement logic data , we simply write the data into the register , but the process itself is already sending steer MK hardware .читать дальше >> Data transfer via the SPI AVR. Lesson 10 AVRInterface SPI is widely used to share data in microcontroller technology, and probably the most popular to date from the serial interfaces . Main characteristics SPI is the ease of use , a small length of transmission wires , and high speed data transmission. In microcontroller atmega8 spi implemented in hardware , that is what we use to write firmware in microns. SPI feature is that there is one master (Master) and one or more slaves (Slave) trong> Here is an example of data transmission between two microcontrollers , the first will lead to the second slave .![]() читать дальше >> |