In this project, we’ll demonstrate how to make a colorful, king-sized coconut tree (5 feet) decorative showpiece using a digital RGB LED strip. The RGB LED strip is cut and arranged to form the shape of a coconut tree. The ATMega328 microcontroller is used to control the LED strip, generating several flashing, fading, and blinking…
The 1-Wire protocol is a single-wire interface, half-duplex, bidirectional, low-speed and power, long-distance serial-data communication protocol. Although this protocol is classified as a 1-wire standard, at least two wires are required in the 1-wire standard bus — one for the data and/or power supply and another for the ground return. An additional wire might be…
With smartphones, autonomous vehicles, and 5G wireless connectivity dominating the landscape of embedded design in 2022, Microchip’s 8-bit PIC and AVR microcontroller (MCU) families are gaining market share. Over the past 50 years, the market for 8-bit MCUs has grown steadily and Microchip currently sells one device for every human in the western hemisphere each…
If we look around, we will find ourselves to be surrounded by computing systems. Every year millions of computing systems are built destined for desktop computers (Personal Computers, workstations, mainframes and servers) but surprisingly, billions of computing systems are built every year embedded within larger electronic devices and still goes unnoticed. Any device running on electric power either already has computing system or will soon have computing system embedded in it.
Most engineers start their journey in embedded systems with microcontrollers. With microcontrollers, one gets a complete miniature computing system on a single integrated circuit. The CPU, RAM, ROM and Input / Output peripherals all on a single thumb size SoC. This very popular approach to learning embedded design and development is in fact just the one side of the complete picture. Working with microcontrollers (and microprocessors) is all about software-based embedded design.
ATtiny85 microcontroller is a very popular 8-bit RISC microcontroller. It has become the first choice for professionals and developers because of its incredible features in such a small size. As its name suggests, it’s a tiny 8-pin (PDIP) microcontroller with almost all required features that any microcontroller should have such as built-in FLASH, EEPROM, SRAM,…
With the rapid use of smartphones and tablets around the globe, apps have become an inseparable part of our lives. Not only we tend to use them for entertainment but these are also quite useful for educational as well as professional purposes. This wide spectrum of users also includes people belonging to the field of electronics ranging from beginners to professionals.There are different apps which provide access to important information regarding the materials, tools, calculations and notable theoretical knowledge involved in the electronics projects.
Measuring an individual battery voltage or a whole bank of battery using any microcontroller(arduino, microship pic, Avr, Atmega, Intel, NXP, stm32)is an easy task. You can find many tutorials on internet on how to do so. But what about if we want to measure an individual battery connected to a cluster of batteries in series…
This is a common dilemma among electronics community of engineers whether they are DIY hobbyists or professionals working on a prototype. There may be a case that one might have worked on some microcontrollers and now willing to propel the academic excellence by working on development boards or do one needs to choose a development board for a do-it-yourself engineering project. Let’s have a fundamental understanding of both the boards to make clear which to select.First thing is that both Arduino and Raspberry Pi offer a range of development boards with different specifications and features.
In any microcontroller the Boot-Loader is the first code which executes before the application code does. The major function of the Boot-Loader is to load the application code into the flash memory of the microcontroller and execute it. In AVR microcontroller the Self Programming Mode (SPM) helps the Boot-Loader to load a particular application from where the application binary is stored.The Boot-Loader may receive the code binary from other memory chips, SD-cards or through the serial port of the microcontroller in case of serial programming. It is then with the help of the SPM that the microcontroller write the binary code into the application flash section. In this particular project the operation of a Boot-Loader code using the SPM is demonstrated by re-writing flash memory with the code binary which has already been flashed into the built-in EEPROM of the ATMEGA16. The hardware used in this project includes ATMEGA16 as microcontroller, USBASP as the programmer and the software used are AVR STUDIO4 as IDE and AVR-BURNO-MAT as the burner software.
In almost all the microcontroller codes the peripheral initialization functions like uart initialization, spi initialization are written along with the different application codes. These initialization functions are actually repetitions of the original initialization functions. The same is the case with the external hardware initialization like LCD initialization, GSM modem initialization etc. Suppose the case in which the application codes required are stored in a memory chip or SD memory card so that there is an option to select between the applications. If all the application codes have the same functions for peripheral and external hardware initialization that will simply increase the size of the code only and the size of the memory required to store the codes. It will take too much time for the Boot-Loader to load such a large size application and there will be flash memory shortage issues due to the large code size. These issues can be solved by doing the initialization of the peripherals and the external hardware in the code running from the BLS itself.
In the AVR microcontroller the flash memory is divided into two parts, namely Application Section and Boot Loader Section. A code can be programmed into either the Application Section or the Boot loader Section (BLS). The code programmed into the Application section runs normally and is used for common applications, whereas the code running in the BLS is provided with some special features. The code running in the BLS section can execute Self Programing Mode (SPM) instructions which are blocked for the code running in the Application section. Using SPM instructions the code from the BLS can rewrite the code in the application section or the code in the BLS itself. The BLS section is normally used for storing the Boot-loader code for the microcontroller. The Boot-Loader code can be used for initializing the peripherals in the microcontroller, initialize the devices connected to the microcontroller, select the application to load and execute from a storage medium, load the selected application to the application section, jump to the application section and execute the application.
This project explains how to interface the SD card with an AVR microcontroller. In this project an ATMEGA16 microcontroller is used. The microcontroller runs on 5V power supply with a built in crystal frequency of 8 MHz. A 2GB SDSC card from Transcend is used in this particular project, but the code will work with most of the SD cards. The SD card is formatted with FAT32. The ultimate aim of this project is to read a file from the FAT32 file system of the SD card.The SD card has been formatted as FAT32 before interfacing. The generalized code for the FAT32 is written to interface the SD card. Explanations of the FAT32 file system and how to access files from these file system is explained in this project.This project explains the SD card interfacing with an AVR microcontroller and circuit working in detail. Read more to find out how this project works and do it yourself!!!
GPS modem is a device which receives signals from satellite and provides information about latitude, longitude, altitude, time etc. The GPS navigator ismore famous in mobiles to track the road maps. The GPS modem has an antenna which receives the satellite signals and transfers them to the modem. The modem in turn converts the data into useful information and sends the output in serial RS232 logic level format. The information about latitude, longitude etc is sent continuously and accompanied by an identifier string.This article shows how to interface the GPS modem with ATmega16 and extract the location (latitude and longitude) from the GPGGA string and display it on LCD. The connection of GPS modem with AVR microcontroller (ATmega 16) is shown in the circuit diagram. The ground pin of max 232 and serial o/p of GPS modem is made common. Pin2 of MAX232 is connected to pin 3 of GPS modem and pin 3 of max 232 is connected to pin 2 of modem. This type of connection is called a serial cross cable.
Some high end applications require multiple or critical calculations to be done by the microcontroller. This may lead to cases when the controller enters intowrong or infinite loops. As a result of this, the system either hangs up or gets crashed. The solution to overcome these situations is to automatically reset the system whenever such a situation arises.The Watchdog Timer is a hardware or software generated timer interrupt which reboots/resets the system in the situations mentioned above. The watchdog timers are also used in cases when you intentionally require resetting the system without any physical interference.The AVR microcontroller has an in-built watchdog timer. This article explains the working of watchdog timer in ATmega16. The Watchdog Timer is a special timer which can be enabled in any section of the code and when enabled it ensures that a certain number of instructions execute within a pre-defined time frame. This time frame or the time delay can be configured/set using the registers of the watchdog timer.
ADC is an electronics device that converts the analog signals to digital number proportional to the magnitude of voltage. The ADClike ADC0804, ADC0809 etc., give 8-bit digital output. The controller device needs eight pins to receive the 8-bit data (For more details about ADC refer to Using Inbuilt ADC of AVR). Some applications need higher resolution ADCs, (10 or higher bits digital data output) for data accuracy. Using parallel ADCs is one option for such applications. However using parallel ADC will increase the size of the hardware as a 10-bit parallel ADC will have 10 output lines. Also you might have to use controller with higher number of pins. The other option is to use serial ADC, which needs smaller number of pins. Since the data is transmitted serially, the data transfer rate of the serial ADC is low as compared to parallel ADC. They can serve as a very good alternative in applications where speed of data transfer in not a critical point. This article explores interfacing of serial ADC0831 with ATmega16.
For understanding the human needs a system must be able to take input from user. The devices which can be used to take input for a system are keypad, touch [[wysiwyg_imageupload::]]screen, etc. In the article LED blinking, the microcontroller drives the LED or in embedded language the microcontroller was set to give o/p, this article gives brief information of getting an input from user at a particular pin of microcontroller. In order to take input from an external source on any of the pins of the AVR microcontroller, the pins need to be configured as input pin. This configuration informs the controller that the corresponding pins are used to take input. Read more to find out how the circuit is constructed and how the IC can be programmed to work in the desired manner.
This article explores the TWI interfacing between two ATmega32 controllers. Readers are advised to go through TWI Communication and TWI registers[[wysiwyg_imageupload::]]of ATmega32 before going further. Generally modes 1 & 3 and modes 2 & 4 are used together. This article explains the use of these four modes by an experiment.To establish the communication between two ATmega32 using TWI interface. First the Master starts by sending data then the slave transmits complement of the received data to the master. When the Master receives the complemented data, it shifts the original data to left. This process of transmitting and receiving continues. As the data value reaches 0x80 the whole process is repeated. At the starting, value of the original data is 0x01. The received value is displayed on PORTB at both the ends.
Servo motors find huge applications in industries in the field of automation, control & robotics. The servo motors are well known for their precise control and work [[wysiwyg_imageupload::]]on the principle of servo mechanism. The servo motors can be made to run at precise angle using PWM. The PWM (pulse width modulation) is the basic working principle behind a servo motor (For more details about PWM refer Phase correct PWM mode). This article explores the interfacing of servo motor with ATmega16. Also to know more about servo mechanism see Interfacing Servo Motor with 8051. There are different types of servos available in the market. This article bounds its scope to interfacing a commonly available servo, widely used by hobbyist with ATmega16. Such a servo consists of three wires positive supply, ground and a control signal. Unlike other motors, Servo motors don’t require any driver. When a PWM signal is applied to its control pin the, the shaft rotates to a specific angle depending on the duty cycle of the pulse.
Keypad is most widely used input device to provide input from the outside world to the microcontroller. The keypad makes an application more users interactive. [[wysiwyg_imageupload::]]The concept of interfacing a keypad with the ATmega16 is similar to interfacing it with any other microcontroller. The article of Interfacing keypad with 8051 can be referred for detailed description of the methodology used here. This article explains the interfacing of a 4×3 keypad with AVR microcontroller(ATmega16) and displaying the output on a LCD. The algorithm and detailed explanation for keypad interfacing is given in above mentioned article. The brief steps to interface the keypad with AVR are written below:1. Configure the row pins or column pins.2. Make all output pins to low and input pins to high.3. Keep monitoring the port value, where the key pad is connected.