This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

counter on MSP430FG477

Other Parts Discussed in Thread: MSP430FG477

how can I use the counter to measure the counts per second on MSP430FG477 using the counter. I have input signal coming in and I need to measure the counts per second using MSP430FG477

  • For anything that has to do with counting you normally set up a timer. If you want to measure counts per second, then it depends on the required accuracy if you need an external crystal for the timer, or if the internal DCO is precise enough for you (in most cases I would prefer the crystal in such an application). Depending on the resolution you want to have, you must choose a proper crystal frequency. I would start with having a look at the code examples TI has made. There are a lot of examples that describe using the timer module.

    Dennis

  • hey its the counter query. I got a no clue where to start with and I have limited time to finish this before 15th of this month and I need your expertise to help me please. The link is https://e2e.ti.com/support/microcontrollers/msp430/f/166/t/436274             I have also attached my mezzainine card schematics which holds MSP430FG477 and have also attached the pdf file describing my project ( I need to do the detector event rate (count rate) part means calculate the count rate using counter)JatinKhilani.ResearchProject.pdf

  • 7853.JatinKhilani.ResearchProject.pdfhey its the counter query. I got a no clue where to start with and I have limited time to finish this before 15th of this month and I need your expertise to help me please. The link is             I have also attached my mezzainine card schematics which holds MSP430FG477 and have also attached the pdf file describing my project ( I need to do the detector event rate (count rate) part means calculate the count rate using counter)

  • >I got a no clue where to start with

    You always shall try to start with.. reading manual. In case of your chip it is User's Guide

    Also HP/Agilent/Keysight have excellent application note about frequency counters

    > I have limited time to finish this before 15th of this month

    Well... you have to hurry up

  • Jatin, did you have a look at the suggested code examples so far? There are small programs that show the basic use of the different modules, also for the timer module. And Ilmars is right - read that chapter in the user's guide to get a first idea on how the timer works in general and the different modes of operation it has. The user's guide looks deterring at first sight, but you only need to read the appropriate chapter of the function you want to use and this isn't that much at all.

    Dennis
  • To count the number of events per time, you need a reference clock for your timebase. You can either count the number of reference clock ticks between two events to the number of events between two (or a fixed number of) clock ticks. Which method to use depends on the expected frequency of events in relation to the available reference clock.
    If you have few events per second, use SMCLK as clock source to a timer and capture the timer counts of two subsequent events.
    If you have many events per second (>10000), use the event as external timer clock input, and capture the event count of two ACLK timer tics, driven by 32768Hz crystal or REFO. Then you can easily calculate the number of events per second.

    How to use the timer is described in your MSP's family users guide. The information how to use ACLK as capture trigger and how to connect the external signals to the MSP (pinout) is found in the device datasheet.

**Attention** This is a public forum