Reprints     Printer-Friendly    Email this Article    RSS        Font Size     What's This?

[Ideas For Design]
DOWNLOAD THE CODE:
1778.zip


RISC Controller Backs Frequency Counter



Dhananjay V. Gadre  |   ED Online ID #1778  |   December 9, 2002

Article Rating:

Frequency measurement, often vital to design engineers, is the driving force behind this idea. Here, an AVR RISC controller-based circuit can measure the frequency of digital signals. It employs the PC as a user interface and sends the measurement results back to the PC through the serial port.

The user interface connects to the PC's serial port at a rate of 9.6 Mbits/s—8 data bits, 1 stop bit, and no parity (Fig. 1). The heart of the circuit, the AT90S2313 AVR RISC controller, operates at a 4.000-MHz crystal clock frequency. It counts the pulses on its PB2 input pin over the user-selectable counting period of 0.1, 1, or 10 seconds. At the end of the counting period, the accumulated count is sent to the PC in the form of four hexadecimal numbers (16 bits), followed by ASCII code for linefeed and carriage return. Until the user resets the system, the process continues.

At power on, the interface sends a message over the serial line, prompting the user to select a counting period via the keyboard (Fig. 2). Pressing 0, 1, or 2 selects a 0.1-, 1-, or 10-s counting period, respectively. If any other key is pressed, the 10-s counting period is selected by default. A terminal emulator program (VTERM under DOS prompt) is used to communicate with the interface. Similar Windows programs, such as HyperTerminal, are also effective. The data being sent by the interface can be piped to a text file for later analysis. For data plotting, Windows-based Microsoft Excel or Linux/Unix-based Gnuplot can be employed.

To download the program listing for this frequency counter, click Download the Code at the top of the page.




Reprints     Printer-Friendly    Email this Article    RSS        Font Size     What's This?


  • C Tools Accelerate HDV Development On Xilinx FPGAs
  • A New Design Inflection Point
  • Forecasting Industry Growth For 2009 And Beyond
  • EDA Retools To Exploit Multicore Architectures
  • Design And Verification Move Up In Abstraction
  • EDA Retools To Exploit Multicore Architectures
  • A New Design Inflection Point
  • Design And Verification Move Up In Abstraction
    1) Transportation Guidelines For Lithium Batteries Get Updated
    (1224 views today)
    2) Build A Smart Battery Charger Using A Single-Transistor Circuit
    (282 views today)
    3) WHITE PAPER: Liquid-Level Monitoring Using a Pressure Sensor
    (204 views today)
    4) 1-A Switching Regulators Operate With 96% Efficiency To Replace Linear Regulators
    (137 views today)
    5) The Field Of Energy Harvesting Begins To Ripen
    (107 views today)
    ALL TOP 20







    Reader Comments

    Rating Only

    Rating Only -July 30, 2007   (Article Rating: )

    figure 1 above is the circuit diagram and this site has the code too in a zip form..

    Anonymous -June 19, 2006

    I'll have loved to see the circuit diagram, or at least even a briefing of the parts used and the working principle. It's a project I'll like to try out.

    ibrahim -October 28, 2005
    Read more comments...

    POST YOUR COMMENTS HERE

    Name:

    Email:
    Rate this article:

     less useful more useful 
    1
    2
    3
    4
    5
    Your Comments:

    Enter the text from the image below




    Please refresh the page if you have trouble reading this text.
     
     

    PartFinder

    Find real-time pricing, stock status, same-day/next-day shipping options and more. Brought to you by Digi-Key. Go to PartFinder.    
    GlobalSpec

    PART SEARCH :
    Powered by: GlobalSpec - The Engineering Search Engine
    Sponsored Links

    Electronic Design Europe Electronic Design China EEPN Power Electronics Auto Electronics Microwaves & RF
    Mobile Dev & Design Schematics Find Power Products Military Electronics EE Events Related Resources