Counter Implementation

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Counter Implementation

969 Views
Vijay_Vj
Contributor I

Hi Everyone,

I will working to implement the Counter with Development board OM13098LPCxpresso54628 (eg. I give some Plus in Counter pin that is read the count value with Every one seconds).

How to Configure and implement the Counter registers and What are the step to follow?
Any Counter Sample program is available?

Thanks & Regard

Vijay

Labels (5)
Tags (1)
0 Kudos
Reply
5 Replies

943 Views
Vijay_Vj
Contributor I

Hi Alice,

I know the step as to variable declearation and time configuration.

but I want to know the How to Configure the Timer And configure the Counter in MCUxpresso IDE.

And what are registers to Configure to Counter?

 

Thanks and Regard,

Vijay

 

0 Kudos
Reply

927 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @Vijay_Vj 

1)There are some basic demos about timer, counter under SDK, for example "ctimer_match_example".

Download SDK from:

https://mcuxpresso.nxp.com/en/select  

2) Also you can use MCUXpresso configure tool to config refer to your requirements:

Alice_Yang_0-1686205705905.png

 

BR

Alice

 

 

0 Kudos
Reply

924 Views
Vijay_Vj
Contributor I

Hi Alice,

I will use the sample program of "ctimer_match_example"  and what are the changes to do in this sample Program.

Plz give more detail explaination.

Regards,

Vijay

 

0 Kudos
Reply

900 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @Vijay_Vj 

Sorry there isn't an example code exactly for your application.

Recommend you refer to user manual of chip and SDK demo to development.

 

BR

Alice

0 Kudos
Reply

952 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @Vijay_Vj 

You can consider below steps:

1) Define a global variable cn.

2) Enable plus pin interrupt, in the interrupt, cn+1;

3)Configure timer, read the value of "cn" in each seconds interrupt.

 

Just a simple suggestion.

 

BR

Alice

0 Kudos
Reply