plz help me to write code for COUNTER to know given frequency& send it for every 1sec through UART in ARM7(LPC2368).
HOW TO USE TIMER AS A COUNTER,HOW TO COUNT FREQUENCY,IN 1SEC HOW CAN IT SEND TO ANOTHER DEVICE THROUGH CAN ANY BODY PLZ GIVE ME A BRIEF OVERVIEW PLZZ...
Didn't your teacher give you some ideas about the workings of timers?
I think NXP thoroughly documents their parts.
If the task is too complicated, start by doing simpler tasks, and breaking the complex ones down.
Well, they did document the LPC23xx chips well enough that I managed to implement counting, timing and frequency-measuring with optional prescaling with the timer modules. But I obviously couldn't do it without reading the documentation - but some people seem to think that the documentation is expected to be read by someone else. Or that the code just magically exist and that the documentation is irrelevant - all that is needed is to just locate that magically existing code.
yes sir,but how to measure 1 sec using internal clk,ok
T2PR=0X00; T2MR0=15000000/*MY CPUCLK IS 15 MHZ*/
CAP0.0 I AM GIVING ANOTHER FREQUENCY WHICH IS NEEDED TO BE COUNT/*TIMER0 I AM USING AS COUNTER*/ T2 WILL GENERATE INTERUPT AT 1SEC BUT AT THAT TIME IS T0TC WILL HAVE FREQUENCY VALUE.