AUTORANGING SHIFTED FREQUENCY COUNTER BASED ON AVR ATMEGA-8

Similar documents
ET-BASE AVR ATmega64/128

How To Program A Microcontroller Board (Eb064) With A Psp Microcontroller (B064-74) With An Ios 2.5V (Power) And A Ppt (Power Control) (Power Supply) (

AVR Butterfly Training. Atmel Norway, AVR Applications Group

[F/T] [5] [KHz] [AMP] [3] [V] 4 ) To set DC offset to -2.5V press the following keys [OFS] [+/-] [2] [.] [5] [V]

Using Xbee in Serial Communication

EXERCISE 3: String Variables and ASCII Code

Wireless Temperature

TURBO PROGRAMMER USB, MMC, SIM DEVELOPMENT KIT

Microprocessor & Assembly Language

POCKET SCOPE 2. The idea 2. Design criteria 3

How to design and implement firmware for embedded systems

Programming PIC Microcontrollers in PicBasic Pro Lesson 1 Cornerstone Electronics Technology and Robotics II

FlowKit in-circuit debug system

PHYS 2P32 Project: MIDI for Arduino/ 8 Note Keyboard

CHAPTER 11: Flip Flops

Serial Communications

Serial port interface for microcontroller embedded into integrated power meter

Hello, and welcome to this presentation of the STM32L4 reset and clock controller.

Digital Electronics Detailed Outline

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs

Accurate Measurement of the Mains Electricity Frequency

3. Programming the STM32F4-Discovery

Flexible Counter Series in DIN size 24 x 48 mm

Measuring Resistance Using Digital I/O

AN3252 Application note

Data Acquisition Module with I2C interface «I2C-FLEXEL» User s Guide

RS-232 Communications Using BobCAD-CAM. RS-232 Introduction

Lab Experiment 1: The LPC 2148 Education Board

User s Manual of Board Microcontroller ET-MEGA2560-ADK ET-MEGA2560-ADK

Impedance 50 (75 connectors via adapters)

APPLICATION NOTE. Atmel AVR134: Real Time Clock (RTC) Using the Asynchronous Timer. Atmel AVR 8-bit Microcontroller. Introduction.

PMAfob Home Automation Demo

EvB 5.1 v5 User s Guide

An Introduction to MPLAB Integrated Development Environment

2.0 Command and Data Handling Subsystem

Microcontroller Based Low Cost Portable PC Mouse and Keyboard Tester

The components. E3: Digital electronics. Goals:

The Programming Interface

Controlling a Dot Matrix LED Display with a Microcontroller

SKP16C62P Tutorial 1 Software Development Process using HEW. Renesas Technology America Inc.

Microcontroller Code Example Explanation and Words of Wisdom For Senior Design

Surveillance System Using Wireless Sensor Networks

Using. SDR-Console by Simon Brown

Upon completion of unit 1.1, students will be able to

Android Controlled Based Interface

Chapter 13. PIC Family Microcontroller

SR2000 FREQUENCY MONITOR

If an occupancy of room is zero, i.e. room is empty then light source will be switched off automatically

Real Time Clock USB Evaluation Board V3.0

Switch board datasheet EB

A 5 Degree Feedback Control Robotic Arm (Haptic Arm)

Solar Energy Conversion using MIAC. by Tharowat Mohamed Ali, May 2011

ASYNCHRONOUS COUNTERS

8-bit Microcontroller. Application Note. AVR134: Real-Time Clock (RTC) using the Asynchronous Timer. Features. Theory of Operation.

AN974 APPLICATION NOTE

Single channel data transceiver module WIZ2-434

PICAXE RF CONNECT KIT (AXE213)

A PIC16F628 controlled FLL (Frequency Locked Loop) VFO for HF

E-Blocks Easy RFID Bundle

LEN s.r.l. Via S. Andrea di Rovereto 33 c.s CHIAVARI (GE) Tel Fax mailto: len@len.it url: http//

Interfacing To Alphanumeric Displays

AVR151: Setup and Use of the SPI. Introduction. Features. Atmel AVR 8-bit Microcontroller APPLICATION NOTE

MANUAL FOR RX700 LR and NR

Block 3 Size 0 KB 0 KB 16KB 32KB. Start Address N/A N/A F4000H F0000H. Start Address FA000H F8000H F8000H F8000H. Block 2 Size 8KB 16KB 16KB 16KB

Page 1 S5.5 Monitoring Software Manual Rev 1.2 for Software Ver 1.0

Mobius 3 Circuit Board Programming Instructions

AN3265 Application note

DSO138 oscilloscope program upgrade method

Using the Siemens S65 Display

DAC Digital To Analog Converter

- 35mA Standby, mA Speaking pre-defined phrases with up to 1925 total characters.

Description of High Accuracy Digital Pressure Gauge Design

The CW Machine Hardware

AUTOMATIC NIGHT LAMP WITH MORNING ALARM USING MICROPROCESSOR

QUICK START GUIDE FOR DEMONSTRATION CIRCUIT BIT DIFFERENTIAL ADC WITH I2C LTC2485 DESCRIPTION

Electronic Rotary Table Divider V2.1 Construction

Implementing SPI Master and Slave Functionality Using the Z8 Encore! F083A

DKWF121 WF121-A B/G/N MODULE EVALUATION BOARD

Opgui and OpenProg user s guide. v.1.2

Voltage boost and buck circuits using Atmel AVR Tiny13V for driving a white LED.

AVR131: Using the AVR s High-speed PWM. Introduction. Features. AVR 8-bit Microcontrollers APPLICATION NOTE

LC7218, 7218M, 7218JM

A DIY Hardware Packet Sniffer

Radiocrafts Embedded Wireless Solutions

Data Sheet. Adaptive Design ltd. Arduino Dual L6470 Stepper Motor Shield V th November L6470 Stepper Motor Shield

Web Streamed SDR s in Service at GB2RHQ Hack Green Bunker

Design And Implementation Of Bank Locker Security System Based On Fingerprint Sensing Circuit And RFID Reader

AVR055: Using a 32kHz XTAL for run-time calibration of the internal RC. 8-bit Microcontrollers. Application Note. Features.

3.2 inch QVGA TFT Color LCD User s Guide Version 1 & 2

(Refer Slide Time: 00:01:16 min)

THE R551N RECEIVER FAQ FAULT FINDING THE REDIFON COMMUNICATIONS RECEIVER R551N. Date: October 10th 1995 by: Jan Verduyn G5BBL

Poor Man s A/D Converter By Dave Wissel at Wave Technology

ECIO40P ECIO28P ECRM40. Page 1. USB programmable microcontrollers. 0.6 DIP footprint. Supplied with a free version of Flowcode. E-blocks compatible

1. SAFETY INFORMATION

COMPUTER BASED REMOTE CONTROL FOR LAYOUT OF SCALED MODEL TRAINS

PROJECT PRESENTATION ON CELLPHONE OPERATED ROBOTIC ASSISTANT

An Introduction To Simple Scheduling (Primarily targeted at Arduino Platform)

Intel architecture. Platform Basics. White Paper Todd Langley Systems Engineer/ Architect Intel Corporation. September 2010

Alpha 10 SERVICE MANUAL. Downloaded from MAX 10 Meter Amateur Transceiver AM/FM/CW/SSB 6 BAND PROGRAMMABLE MODEL AM-1000.

User Guide Reflow Toaster Oven Controller

Transcription:

AUTORANGING SHIFTED FREQUENCY COUNTER BASED ON AVR ATMEGA-8 Designed by Cholis Safrudin YD1CHS http://yd1chs.wordpress.com February, 2011 Thanks to Google Translate ABSTRACT Still rounding out of the 8 bits microcontroller world, but this time I will show the product of the AVR i.e. 28 pins ATmega-8. Project that I was designed is an old topic that is a frequency meter for HF bands that are equipped with autoranging and IF shifting facilities. What I mean by autoranging feature is the FC will adjust the display frequency readings automatically, from xxx.xx Hertz, xxx.xxx.xx KHz and xx.xxx.xx MHz. Furthermore, the Shifting IF feature is the display frequency that has been added or subtracted to an IF frequency which previously had been stored in the EEPROM. IF Frequency Selection made by the user by measuring the LO frequency in the block, then storing into the EEPROM, so any IF frequency can be used as a reference. In the IF shifted mode, the second row on the LCD will display additional information, namely: Shifted F=0 Shifted F>IF Shifted F<IF, atau Shifted F=IF 1

If the user does not need this feature, then simply do release the "SHIFT" button. Thus, the user will be able to find out how much the IF frequency is stored in the EEPROM by comparing differences in the frequency display at both mode "Shifted" and "UN-Shifted". To adapt the microcontroller in order to work up to the highest HF frequency (i.e. 30MHz), so I added an external prescaler before entering into the T1 port on the microcontroller. To get acceptable sensitivity to RF signals with small amplitude, the value of R3 (1k2) can be adjusted so that when there is no entry input, NAND gate circuit in an almost active position. Pre-Amp circuit can be replaced with other designs, but the NAND Gate Port and Flusher GATE Port should be maintained as in the original design. Frankly, I have not done this design into real hardware experiment, but the design had been tried dan debugged using the help of Proteus demo software that can be downloaded for free on the Internet. Here are a few looks: SIMULATION OF SYSTEM PERFORMANCE Views on the side is a welcome message, really just to make sure the user that the basic components of a circuit which includes firmware, hardware and LCD have been working according to plan. Further, I have been doing storage IF frequency of 50 Hertz and now its value has been stored safely in EEPROM. I will try to do the reading frequency for the 3 possibility condition, they are below the IF, the same as the IF as well as above the IF. And will we notice how their behaviour when making measurements on both the "UN-shifted" and "Shifted" modes. The picture on the upper right is the result of reading an input signal measured at 5 Hertz with fashion "UN-shifted", shown readings in accordance with the frequency source. Furthermore, the switch "SHIFT" is activated (pressed), so the current entry on the mode "Shifted" to the IF frequency as I mentioned at 50 Hertz. Looks interpretation is slightly different from the first reading, where the second line displayed a message for the user, namely a shifted mode and F <IF. The point of the F <IF is the measured frequency of 5 Hertz is smaller than the frequency of IF signal that is stored in the EEPROM that is equal to 50 Hertz. The next scenario is to set the input signal with frequency equal to the IF frequency, which is 50 Hertz. Images next to the left shows the input signal in question. In mode "shifted" will be shown readings of 0 Hertz and additional information on the running mode, plus F = IF. Exactly with the previous explanation, that the frequency of the signal being measured together with fekuensi IF. Lastly, what if the incoming signal has a frequency higher than the IF frequency and I think easily predictable result. Input frequency of 120 Hertz, so that the mode "shifted" to 70 Hertz, plus readable description F> IF. 2

Well, I think there must be someone who ask why such experiment is done using Low Frequencies below 1kHz, the answer is a limitation of the simulator program and computer speed. To simulate the above 1kHz will decrease performance of simulation software. HOW IS IT WORKED (HARDWARE) The hardware circuit is divided into 4 parts, first is the RF Pre-Amp which is formed from a small signal transistor 2N2222A or other types. To get the effect of different sensitivity, this circuit can be modified, but ensure that the coupling to the next block does not use a capacitor coupling for the needs of a particular voltage on the input of NAND gate leading to the position just before declared as bit 1 (active) by the microcontroller. The second part are three NAND GATEs (74LS00 or similar) connected to a serial configuration. So when the signal on NAND GATE GATE both activated (active low), then in accordance with the truth table of NAND GATE will be obtained on the condition 1, in accordance with the conditions of the input signal. NAND GATE fourth function as Flusher, for flushing the rest of the clock that is resided in the buffer of the external prescaler. This particular NAND GATE also serves as the second GATE. By controlling the activation of the GATE signal (active Low), then we can set when the input signal into the microcontroller and may be terminated at any time, including how long GATE should be opened, because the sampling period is associated with the CPU Speed and determine what level of accuracy of the counters that we were designed. The third part is an external prescaler (74LS393) with a ratio of 1:256, which means that it takes 256 clock inputs to get 1 pc clock at the output side. Last position condition prescaler output bits are stored (latched) and can be waived when we reset pin, i.e. pin 2 and 12 are activated (active High). The last section which is also the brains of this series is microcontroller ATmega AVR-8 that is connected to a 16x2 LCD. HOW IS IT WORKED (SOFTWARE) In a simple algorithm used in this application is shown by some of the following flowchart.. 3

The flow chart in addition to the main process. Striped box on both sides means a process, and will be explained in more detail later. As usual, the first step prior to major surgery done, then do some configuration and initiation of several things. First is the machine configuration will be used, namely ATmega AVR-8 with an external source clock of 8MHz XTAL (16MHz maximum, I happened to not have a 16MHz XTAL, so in this design I use 8MHz). Because during the operation using the EEPROM, then we must tell the machine at the beginning of this memory usage. Next step is initiation LCDs which include PORTC as a point of interfacing with LCD, using 16x2 LCD and uses a 4-wire communication mode (Data to Data to sd-4-7). Some ports D declared as I / O. PORTD.0 used as a control signal to the NAND GATE Flusher third, PORTD.1 used as a control signal to the NAND GATE GATE second, while functioning as a controller signal PORTD.2 "CLEARER" or the signal to empty the content of external prescaler (74LS393). Two other PORTD are used as an input pin to be connected to the switch, namely PORTD.3 to enable the measurement mode (shifted or non-shifted) and PORTD.4 used to keep the IF frequency to the EEPROM. Subsequent operations were run in accordance with grooves on top. 4

In the major groove seen two processes are simplified with a picture box with a line on both sides. Figure disampaing left is one of them, namely the calculation algorithm of the clock of the input signal. Clock entering the microcontroller is that has been through an external prescaler ratio of 1:256. The second gate opened simultaneously for 125ms to pass the entrance to the microcontroller clock. 125ms election must be in accordance with CPU Speed of the microcontroller is used. ATmega 8MHz XTAL-8 with a CPU Speed of 8 MIPS (Mega Instructions Per Second). That is, every operation performed AVR microcontrollers only requires 1 clock cycle. Compare with PIC microcontroller product that has a CPU Speed clocknya quarter of the source, or in other words one operation requires four clock cycles! With a period of 125ms then without using additional external components, microcontroller will be able to measure frequencies with an accuracy of 8 Hertz, but by using additional external prescaller plus a special algorithm to drain all the contents of buffer, so as to get the accuracy up to 1 Hertz! Then how the upper limit of measurement? Since the AVR only need 1 clock cycles in one full operation, then it should be the maximum frequency that can be measured is the maximum amount of clock is used, in this case 8MHz. Why then why this series is claimed to work up to the range of HF, is not the highest in the definition of HF frequency is 30MHz? His response prescaller who do it for us. In this design, the 74LS393 will do prescalling 1:256, so in theory this circuit capable of measuring up to 256 * 8MHz = 2GHz. But according to the datasheet 74LS393 only able to perform their duties until the frequency of 35MHz, so the number tersebutlah be the upper limit of measurement. The second process is indicated with striped boxes on both sides are counting on the frequency of the IF Shift. 5

Chart shows besides simple and easiest method to get the effect of the shift, which is calculated by subtracting the clock time with the IF frequency has been stored in the EEPROM. Furthermore, several grooves at the bottom is an operation to display a message on the second line of LCDs that are in fashion "shifted" and tells how to position F of the IF. From this simple information, if the circuit is applied together with a single transveicer Conversion, the user can use it to find work in USB or LSB. Ifwe do not never make a stored value IF frequency,then the system is designed to automatically write to the EEPROM IF frequency of 0 Hertz. Thus, when a user uses the mode "shifted" so he will be told that IF = 0. HARDWARE REALIZATION I am including the firmware from this project include files *. HEX (please do not ask me the firmware Such as *. ASM or other extentions) and ready to be downloaded to the microcontroller ATmega-8. Because everything is merely an experiment, so all the risk that exists is in your own hands. In doing my downloads using software Khazama AVR Programmer with fuse bits settings blank (done by firmware settings). USAGE PROCEDURE Following the procedure the use of this project: How to turn on: 1. Make sure the whole set of connected properly and the whole set of ration voltage is 5V. 2. Be sure to operate the LCD backlight and contrast settings sufficient. 3. Make sure there is no connection active component of reverse polarization. 4. Connect to ration 9V battery and wait a while until the frequency display is shown. How to save IF Frequency: 1. Make sure all the switches in the OFF (unpressed). 2. Follow the procedure above ignition. 3. In mode "UNSHIFTED" measuring the frequency of LO (IF frequency) is desired and wait until the reading stabilized. 4. Press the switch "SAVE" only once. 5. Press the switch "SHIFT" to measure the frequency LO modes shift toward the top, and the measurement should be close to 0 Hertz. 6. The series is ready for use. ACKNOWLEDGMENTS Pre-Amp, NAND GATE and Pre-Scaller circuit is adopted from the work of E. Skelton EI9GQ. Design and programming side of the microcontroller firmware on ATmega-8 are the original works of Cholis Safrudin YD1CHS. 6

7