Programmable logic devices

In a market, you can find a bunch of programmable logic devices – PLD. They can be small scale integrated – SSI, medium-scale integrated- MSI, mask programmed gate array – MPGA (MPGD – masked programmable logic devices). Now the most popular are FPGA (Field Programmable Gate Arrays). What is the difference between FPGA and MPGA? MPGA is hard-coded during manufacturing and cannot be erased or reprogrammed, while FPGA is programmable – usually EEPROM or SDRAM. Of course, there are other differences between FPGA and MPGA. One of them is speed. MPGA usually is faster as MPGA needs fewer elements to form a logic gate while FPGA needs additional elements to enable programmability – this adds additional resistances and capacitances in circuits. But today’s technology allows reaching significant speeds with FPGAs too.

Continue reading

AVR microcontroller memory map

AVR microcontrollers are using Harvard architecture. This means that separate memory types (program memory and data memory) are used and connected with distinct buses in this architecture. Such memory architecture allows processors to access program memory and data memory at the same time. This allows increasing the performance of MCU comparing to CISC architecture, where the CPU uses the same bus for accessing program memory and data memory. Each memory type has its own address space: For instance few Atmega series memory map examples:

Continue reading

Flash programming of AT89 microcontrollers using ISP adapter

Microcontrollers family AT89C has a parallel programming interface of flash memory. To write information, we need to supply programming voltage +12V, and for controlling, almost all pins of ports are used. This is why parallel programming is done in special devices – programmers. Microcontrollers AT89S, besides parallel programming ability, have ISP programming ability. Using the Serial programming interface doesn’t need +12V of programming voltage because the inside interface is voltage converter included.

Continue reading

Programming and customizing AVR microcontrollers

AVR microcontroller programs can be classified by programming method – how to program is loaded into microcontroller from the computer. One is a Parallel programmer (byte by byte). This isn’t a popular programming method. But it is a fast programming method. Using a parallel programmer, you can set fuses that will protect you from using the ISP method. But the main disadvantage of parallel programming is that you have to remove the microcontroller from the circuit. This might be used when producing a series of the same kind of preprogrammed microcontrollers before they are soldered into the board. The parallel programmer can program the RESET pin to be used as a fully functional I/O line; this is why ISP cannot be used after this procedure. Restoring of the RESET function can only be done with a Parallel programmer. The serial programming interface is more convenient for electronics hobbyists. The main benefit of the ISP programmer that you can program the microcontroller directly on board. ISP programmers can be connected to COM or LPT port. COM port is becoming obsolete as it requires additional circuitry, while LPT programmer can be as simple as few wires connecting AVR to LPT port. Popular…

Continue reading

Embedded C program libraries and linking

What is a compilation of programs? Maybe it is more or less clear? But what is program linking? I am sure many beginners heard of this but done exactly know what it is. In a few words, I can say that linker creates an output file from relocatable objects. The compiler is not one big program. It usually consists of up to a dozen smaller programs. Some programs, so-called program driver, control these programs. This driver can be a makefile and make.exe program. The whole compiler pieces are the preprocessor, the syntactic and semantic checker, code generator, the assembler, the optimizer, the linker, and make program. Lets see a common example of the compiling procedure: These programs are split into pieces for easier design and maintenance as each is a specialized program on its own. In many cases, the same program can be used for different programming languages. One disadvantage of running different tools will take a longer time than running one bigger program because there is a need to send information between programs.

Continue reading

Sensing Sound Wave with microcontroller

A sound wave can be sensed by using a sound sensor. If you are designing a robot, sometimes it is useful to enable sensing of sound. Then you can program your robot to follow your voice commands. In some cases, sound wave sensors are used as collision sensors. A sound wave sensor is a microphone. The microphone is a device that converts sound pressure into electric signals. Let’s see how sound waves can be sensed. As we already know, the sound is a complex signal which consists of multiple different frequency waves. One sound wave can be represented as sin or cos signal: When many of such waves are summed (s called harmonics), we can represent any analog signal- any shape and any frequency.

Continue reading

IrDA interface for an embedded systems

IrDA is a transmission standard commonly used in computers and peripherals like mobile phones. The primary purpose of IrDA is to provide device-to-device communication over short distances. IrDA solves the problem of usage cables, which may differ from machine to machine. With IrDA, no wires are required, so this is easy to connect the same device to multiple device types like your mobile phone to laptops, other mobile phones, or PDA’s. IrDa standard requires close communication of devices. This is low power transmission. It is essential because regulations are guarding the maximum level of IR radiation that can be emitted. It is also reasonable to assume that the two devices to communicate will be physically pointed toward each other before use. And only two devices can communicate at the same time. So IrDA doesn’t have to deal with collisions. And the main thing that IrDa is simple, cheap, and requires low-cost parts. The IrDA standard specification states that supported data rates can be between 2400bps and 115.2kbps over 1-meter distances. Later standard has expanded to support 1.152 and 4 Mbps. The transmitter beam angle is from 15 to 30 degrees, and the receiver has A viewing angle of 15 degrees.…

Continue reading

Prototype board types

If you are starting to take an interest in electronics, this is a good thing to know what type of prototyping boards can be used. There can be four types of prototype boards: Solderless breadboard- where connections are made by using jumpers;

Continue reading

USB powered power amplifier for your PC

I faced this article when I was looking for a simple solution to increase the output of my PC’s integrated sound card. The sound level of it decreased, so I can’t normally listen to my headphones. So this article is about how to increase your PC sound card’s power by using a minimal amount of parts and a USB power supply. This might be a good solution for all of those who have a PC with an integrated sound card into the motherboard. The main problem is that the outputs of such sound cards are for active acoustic systems; this means that speakers must have a power amplifier built-in. If you decide to connect headphones sometimes, it might not be enough to provide the required sound level. If you are an electronics amateur, you can solve this very easily. You may build your simple power amplifier by using well known Philips operational amplifiers. Let’s say we use the TDA7053 amplifier. The TDA7053 is an integrated class-B stereo power amplifier in a 16-lead dual-in-line (DIL) plastic package, which requires a minimal amount of external parts. This is a straightforward solution for easy, quick, and quality design. One of the board solutions…

Continue reading

Set up AVRStudio to use AVR-GCC compiler

After the release of AVRStudio4, there is possible to integrate the AVR-GCC compiler into it. As you know, AVRstudio is a powerful tool that has an assembler compiler- debugger, programmer, etc. Integration of AVR-GCC makes this tool a much more powerful and more complete playground for developers. A plugin built-in AVRStudio detects the AVR-GCC compiler by itself, so you don’t have to bother how to tie them together. And here we go – full set of good tools comparable to commercial. The convenient user interface, automatic makefile generation, visual debugging by watching processors register, or even you can flash the chip. How to set up the working environment? This is simple. First of all, you have to download WinAVR20060421 and install it on your machine. Then download AVRStudio Version 4.12 and service pack 3 and install them on your PC. And… that’s it. You are set. Now open AVR Studio and select menu->Project Wizard->New project. In a Welcome AvrStudio4 Screen, select Project Type AVR GCC, enter a project name, select Create Initial file if you want to initial c file to be created. Select Create Folder to put project files in a separate folder. Enter an initial c file name.…

Continue reading