Discussion in "Project Help" started by    Utsavi    May 17, 2017.
Wed May 17 2017, 11:01 AM
#1
Hello

I am working with PXAG49KBA. In my project I used Timer0 as Timer and Timer1 as counter.

The timer in my case is working perfectly (1msec timer).

I want to use Counter to count external frequency. I set Counter 1 in 16 bit non auto reload mode (Set TMOD to 0x50). I cleared TH1 and TL1. Set TR1. On every 500msec I read TH1 and TL1 and clearing it. Every time I got garbage values.

Do I required to use RTL1 and RTH1?

Is there any register I need to set in XAG-49?

In my previous project I worked on P89C51RD2 and used Timer1 as Counter, which is working ok. From the reading, XAG-49 and P89C51RD2 have same settings.

But still my counter is not working. Also I set T1OE bit to 0. Still not succeed.

Any clue on this?

Regards
Utsavi Bharuchwala







Wed May 17 2017, 07:38 PM
#2
Just from reading the data sheet you seem to doing the right thing.

> Do I required to use RTL1 and RTH1?
I don't think so.

Are the values in TH1 and TL1 correct ( or at least stable) if you use timer mode ( TMOD = 0x10).
How are you timing the 500msec ?
It seems most likely your counter input is faulty, where does it come from ?


Thu May 18 2017, 05:57 AM
#3
Hello

Thanks for reply.

No the input pin is not faulty. I measured the frequency from input pin, which is OK. I also toggle Input pin.

> I read counter on every 500msec with help of my 1msec Timer 0, by incrementing variable upto 500 and after reset it.

Can you provide me a demo of XAG-49 counter so that I can verify.

Regards
Utsavi Bharuchwala





Thu May 18 2017, 11:18 PM
#4


Can you provide me a demo of XAG-49 counter so that I can verify.

Utsavi


I have never used the XAG-49 so can't provide code known to work on it.

What signal are you using as input to the counter ?

Can you provide your code and a circuit diagram.

Get Social

Information

Powered by e107 Forum System

Conversation

poojab51296
Sun Aug 20 2017, 10:23 AM
i am intending to interface sd card with STM32F4 and want to write a file in sd card using SPI protocol but using HAL only. Can anyone help me PLEASE!!!!
poojab51296
Sun Aug 20 2017, 10:22 AM
hello
rawat742
Fri Aug 18 2017, 11:37 AM
hi @ angel patel i will attach a file i hope it will be helpfull for you
ExperimenterUK
Mon Aug 14 2017, 09:57 PM
@ angel patel... just log in and post your problem
Mon Aug 14 2017, 01:45 PM
angel patel
hey any one help to make the led scrolling display
desuza6
Sat Jul 29 2017, 07:09 AM
I see the code for step motor h l 298 to rotate 45 degree, but all delay time, if I want to input sensor to h the pulses to stepmotor
rammichael
Thu Jul 27 2017, 12:05 PM
okay fine
ExperimenterUK
Wed Jul 26 2017, 07:51 PM
Please post questions in the forum, the chat box is for chat
msd007
Wed Jul 26 2017, 11:27 AM
i need code if any one have aduc706 interfacing lcd 16*2
msd007
Wed Jul 26 2017, 11:26 AM
pl help me how to write code of interfacing ADuc7026 controlleo lcd pl any one help me hoe to initializend configure the direction

Downloads

Comments

abdullah6484
Tue Aug 22 2017, 10:21 PM
crank.tp
Mon Aug 21 2017, 02:17 PM
poojab51296
Sun Aug 20 2017, 10:18 AM
kira113
Sat Aug 19 2017, 08:40 AM
Pirateak
Thu Aug 17 2017, 02:02 PM
sathishksk71
Wed Aug 16 2017, 04:47 AM
rawat742
Sun Aug 13 2017, 05:49 PM
alparslanbagriyanik
Fri Aug 11 2017, 08:10 AM

Online

Guests: 60, Members: 0 ...

most ever online: 182184
(Members: , Guests: 182184) on 06 Aug 2010: 05:37 AM

Members: 37882
Newest member: abdullah6484
Forum Activity
rawat742 Avatar
Posted By rawat742
Mon Aug 21 2017, 09:13 PM
Dear sir, I want purchase a debugger for 8051 , p...
rawat742 Avatar
Posted By rawat742
Mon Aug 21 2017, 09:09 PM
Dear Sir, I want to programe for de...
rawat742 Avatar
Posted By rawat742
Mon Aug 21 2017, 09:06 PM
Dear Sir, thanks now I have done almost my pro...
ExperimenterUK Avatar
Posted By ExperimenterUK
Sun Aug 20 2017, 08:31 PM
"when i compile the program using keil ide i got s...
ExperimenterUK Avatar
Posted By ExperimenterUK
Sun Aug 20 2017, 08:15 PM
You will probably get better results from a specia...
ExperimenterUK Avatar
Posted By ExperimenterUK
Sun Aug 20 2017, 06:42 PM
Your data is retained in the simulation.Write data...
rawat742 Avatar
Posted By rawat742
Sun Aug 20 2017, 01:23 PM
Dear sir , I face a error mostly *** WARNING L1...
rawat742 Avatar
Posted By rawat742
Sun Aug 20 2017, 11:21 AM
Dear Sir, thanks I have done Acc to you now I am...
poojab51296 Avatar
Posted By poojab51296
Sun Aug 20 2017, 10:29 AM
Sir/Ma'am,I am trying to interface Sd card with ST...
kira113 Avatar
Posted By kira113
Sat Aug 19 2017, 08:52 AM
hello everyone i write a simple program using c la...