This blog is written for the information and continuous progress update in the final year project of Our team in Asansol Engineering College.
Sunday, 27 April 2014
RF Module
An RF module (radio frequency module) is a (usually) small
electronic circuit used to transmit and/or receive radio signals on one
of a number of carrier frequencies. RF modules are widely used in
electronic design owing to the difficulty of designing radio circuitry.
Good electronic radio design is notoriously complex because of the
sensitivity of radio circuits and the accuracy of components and layouts
required to achieve operation on a specific frequency. Design engineers
will design a circuit for an application which requires radio
communication and then "drop in" a radio module rather than attempt a discrete design, saving time and money on development.
RF modules are most often used in medium and low volume products for consumer applications such as garage door openers, wireless alarm systems, industrial remote controls, smart sensor applications, and wireless home automation systems. They are sometimes used to replace older infra red communication designs as they have the advantage of not requiring line-of-sight operation.
Several carrier frequencies are commonly used in commercially-available RF modules, including 433.92 MHz, 315 MHz, 868 MHz and 915 MHz. These frequencies are used because of national and international regulations governing the used of radio for communication.
Source: Wikipedia & Engineering Garage
RF modules are most often used in medium and low volume products for consumer applications such as garage door openers, wireless alarm systems, industrial remote controls, smart sensor applications, and wireless home automation systems. They are sometimes used to replace older infra red communication designs as they have the advantage of not requiring line-of-sight operation.
Several carrier frequencies are commonly used in commercially-available RF modules, including 433.92 MHz, 315 MHz, 868 MHz and 915 MHz. These frequencies are used because of national and international regulations governing the used of radio for communication.
Source: Wikipedia & Engineering Garage
AtMega16A
The AVR is a Modified Harvard architecture 8-bit RISC single chip microcontroller which was developed by Atmel
in 1996. The AVR was one of the first microcontroller families to use on-chip flash memory for program storage,
as opposed to One-Time Programmable ROM, EPROM, or EEPROM used by other microcontrollers at the time.
Atmel's low power, high performance AVR microcontrollers handle demanding 8 and 16-bit applications. With a
single cycle instruction RISC CPU, innovative Pico Power® technology, and a rich feature set, the AVR architecture
ensures fast code execution combined with the lowest possible power consumption.The AVR microcontrollers are
divided into 4 families tiny AVR, mega AVR, XMEGA and Application specific AVR. Among these 4 families of AVR
here we are going to use a microcontroller of mega AVR family “ATmega16”.
ATmega16 is a RISC microcontroller. What does RISC means?
RISC means Reduced Instruction Ste Computing. As the name indicates, The RISC architecture has simple,
hard-wired instructions which often take only one or a few clock cycles to execute. RISC machines feature a small
and fixed code size with comparatively few instructions and few addressing modes. As a result, execution of
instructions is very fast, but the instruction set is rather simple.
A clock is simply a device that keeps track of time, it kind of gives you a beat to move to.
The clock on your wall counts in increments of seconds, for example. A metronome for your
instrument might give you a beat every half or full second. The amount of times a clock
ticks/cycles per second is called its frequency, measured in Hertz (Hz or cycles/second).
Similarly, your ATMega has a clock inside too, and its speed directly relates to how many instructions it can carry out per second (on every tick/cycle of the clock).speed that comes shipped with most AVRs is 1 MHz (1 million cycles per second) because they have internal clocks which keep time. The internal ATMega8 clock can be set up to a maximum frequency of 8 MHz, and beyond that you need an external source or else you would be over clocking your AVR – which could lead to unpredictable problems.
We have two options: use the internal one, or use an external source. If you are writing
code that does basic stuff, and you don’t require precision timing, the internal clock should
suffice. In any other case, particularly for communication (i.e. using the UART for example,
or in my case, USB), timing is critical. In that case, we need an alternate method, so we
use things like crystals, resonators, oscillators, and clocks. They are all suitable to produce
the beat we are looking for, at the frequency we are looking for, but the most common
amongst hobbyists are crystals and resonator (you’ll see how they are pretty much the
same). We will be using a crystal for this tutorial, and it looks like this:
To use the crystal we will also require two ceramic 22 pF capacitors (so have those
handy). A resonator, on the other hand, has the capacitors and crystal built into one
package, thus making it a little more compact. That’s pretty much the only difference, but
there may be subtle differences in setting fuse bits if you are using a resonator – just
something to look out for in the datasheet. Oscillators require an external power source to
operate, and usually have four pins. External clocks, something a lot people don’t have (but
wish they did), can also be used by pumping in a square wave at the desired frequency.
Clocks sources usually need a little bit of time to warm up and start giving us a reliable
signal when the microcontroller is turned on. This is called the start-up time. To play it safe,
we will be using the maximum start-up time to give the clock as much time as it needs to
get up to speed (no pun intended).
This is the one concept which I noticed catches a lot of beginners off guard (myself
included), and is the source of a lot of confusion and mishaps. Typically, there are only two
fuse bytes: a high one, and a low one. As you should hopefully know, one byte contains 8
bits. So we have 16 bits to set to on or off. Each of those bits, depending on whether they
are on or off, impacts the critical operations of the microcontroller. The mistake most
people make is messing around with bits they did not intend to change, or giving bits they
intended to change the wrong value. This is particularly easy because a bit set to 0 means
it is programmed, and a bit set to 1 means it is unprogrammed – kind of counter intuitive,
especially for those who wear binary wrist watches *whistles innocently*. But more on that
later.Going back to fuse bits, basically we modify a few bits in the high byte and the low byte to
tell the microcontroller that the next time you start up, expect an external crystal giving you
a frequency of x MHz, and you have to give it y amount of time to start up before you start
running the code inside of you. That’s pretty much it; look over the section called Memory
Programming on page 215 just to get a general idea of what comprises a fuse byte. As you
may notice, each bit in each of the two bytes has a specific name (i.e. RSTDISBL, CKSEL,
SUT1, etc.). This makes it easier to refer to them, and harder to make mistakes because
the name of the bit alone gives you a good idea about what its purpose likely is. For
example, RSTDISBL stands for reset disable (you do not want to program this guy, unless
you pretty much never want to reprogram your precious microcontroller again), CKSEL for
clock select, SUT for start-up time, etc. Finally, it’s important to note that the default values
for each fuse byte are also listed in the datasheet.
A comprehensive set of development tools, application notes and datasheets are available for
download on http://www.atmel.com/avr.
in 1996. The AVR was one of the first microcontroller families to use on-chip flash memory for program storage,
as opposed to One-Time Programmable ROM, EPROM, or EEPROM used by other microcontrollers at the time.
Atmel's low power, high performance AVR microcontrollers handle demanding 8 and 16-bit applications. With a
single cycle instruction RISC CPU, innovative Pico Power® technology, and a rich feature set, the AVR architecture
ensures fast code execution combined with the lowest possible power consumption.The AVR microcontrollers are
divided into 4 families tiny AVR, mega AVR, XMEGA and Application specific AVR. Among these 4 families of AVR
here we are going to use a microcontroller of mega AVR family “ATmega16”.
ATmega16 is a RISC microcontroller. What does RISC means?
RISC means Reduced Instruction Ste Computing. As the name indicates, The RISC architecture has simple,
hard-wired instructions which often take only one or a few clock cycles to execute. RISC machines feature a small
and fixed code size with comparatively few instructions and few addressing modes. As a result, execution of
instructions is very fast, but the instruction set is rather simple.
A clock is simply a device that keeps track of time, it kind of gives you a beat to move to.
The clock on your wall counts in increments of seconds, for example. A metronome for your
instrument might give you a beat every half or full second. The amount of times a clock
ticks/cycles per second is called its frequency, measured in Hertz (Hz or cycles/second).
Similarly, your ATMega has a clock inside too, and its speed directly relates to how many instructions it can carry out per second (on every tick/cycle of the clock).speed that comes shipped with most AVRs is 1 MHz (1 million cycles per second) because they have internal clocks which keep time. The internal ATMega8 clock can be set up to a maximum frequency of 8 MHz, and beyond that you need an external source or else you would be over clocking your AVR – which could lead to unpredictable problems.
We have two options: use the internal one, or use an external source. If you are writing
code that does basic stuff, and you don’t require precision timing, the internal clock should
suffice. In any other case, particularly for communication (i.e. using the UART for example,
or in my case, USB), timing is critical. In that case, we need an alternate method, so we
use things like crystals, resonators, oscillators, and clocks. They are all suitable to produce
the beat we are looking for, at the frequency we are looking for, but the most common
amongst hobbyists are crystals and resonator (you’ll see how they are pretty much the
same). We will be using a crystal for this tutorial, and it looks like this:
To use the crystal we will also require two ceramic 22 pF capacitors (so have those
handy). A resonator, on the other hand, has the capacitors and crystal built into one
package, thus making it a little more compact. That’s pretty much the only difference, but
there may be subtle differences in setting fuse bits if you are using a resonator – just
something to look out for in the datasheet. Oscillators require an external power source to
operate, and usually have four pins. External clocks, something a lot people don’t have (but
wish they did), can also be used by pumping in a square wave at the desired frequency.
Clocks sources usually need a little bit of time to warm up and start giving us a reliable
signal when the microcontroller is turned on. This is called the start-up time. To play it safe,
we will be using the maximum start-up time to give the clock as much time as it needs to
get up to speed (no pun intended).
This is the one concept which I noticed catches a lot of beginners off guard (myself
included), and is the source of a lot of confusion and mishaps. Typically, there are only two
fuse bytes: a high one, and a low one. As you should hopefully know, one byte contains 8
bits. So we have 16 bits to set to on or off. Each of those bits, depending on whether they
are on or off, impacts the critical operations of the microcontroller. The mistake most
people make is messing around with bits they did not intend to change, or giving bits they
intended to change the wrong value. This is particularly easy because a bit set to 0 means
it is programmed, and a bit set to 1 means it is unprogrammed – kind of counter intuitive,
especially for those who wear binary wrist watches *whistles innocently*. But more on that
later.Going back to fuse bits, basically we modify a few bits in the high byte and the low byte to
tell the microcontroller that the next time you start up, expect an external crystal giving you
a frequency of x MHz, and you have to give it y amount of time to start up before you start
running the code inside of you. That’s pretty much it; look over the section called Memory
Programming on page 215 just to get a general idea of what comprises a fuse byte. As you
may notice, each bit in each of the two bytes has a specific name (i.e. RSTDISBL, CKSEL,
SUT1, etc.). This makes it easier to refer to them, and harder to make mistakes because
the name of the bit alone gives you a good idea about what its purpose likely is. For
example, RSTDISBL stands for reset disable (you do not want to program this guy, unless
you pretty much never want to reprogram your precious microcontroller again), CKSEL for
clock select, SUT for start-up time, etc. Finally, it’s important to note that the default values
for each fuse byte are also listed in the datasheet.
A comprehensive set of development tools, application notes and datasheets are available for
download on http://www.atmel.com/avr.
Subscribe to:
Posts (Atom)