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

Mon May 08 2017, 12:45 PM
ivan muvunyi
please can you send me wiring diagram for automatic control of 3 phase induction motor for production of maize flour
Wed May 03 2017, 08:39 PM
imran qureshi
hello friend
Sun Apr 30 2017, 05:49 AM
Lijin G Varghese
Can u send me the circuit diagram for Program to interface GSM Module with 8051 microcontroller (AT89C51) using PC and LCD
Fri Apr 28 2017, 03:47 PM
SANDEEP T S
I need pcb wizard 3.5 version kindly send valid link of yours
ExperimenterUK
Mon Apr 17 2017, 11:56 PM
Sorry..We had a problem with registration.Confirmation emails were not sent.Please re-register
Thu Apr 13 2017, 07:29 PM
Piyush Aughad
I want circuit & program for radar detection using Microcontroller 8051
Tue Apr 11 2017, 03:27 AM
Shabbir Ahmed
Hi Ajay ....hope you and your family all will be fine are you working on andriod aplications if yes then plz reply me
Sun Apr 09 2017, 06:33 PM
ATHULYA NAIR
Dear Sir, I need to know what are the complexity for programming in 8051 Microcontroller for three phase inverter?
Sun Apr 09 2017, 06:32 PM
ATHULYA NAIR
Dear Sir,
Sun Apr 09 2017, 04:43 AM
Rohit chandra joshi
Sir I need ur help urgently.i am trying to make pc controlled led scrolling display using 8051.when i am trying to generate hex file of the code that is given by pratik suthar.it gives the error Target not created Limit:0800h I am using keil uvision4 software. Even i have tried to burn the given hex file that is atteched with the code but my led are not glowing. Pls help me sir .i struck in this problem from last month and till now i am not able to short out the problem. Pls suggest me to solve the problem.mail me at [email protected] Thanks

Downloads

Comments

Gaurav9527
Tue May 23 2017, 10:24 AM
rapushh
Tue May 23 2017, 10:22 AM
lubnakhan
Sat May 20 2017, 10:23 AM
Utsavi
Wed May 17 2017, 10:35 AM
Samimash
Tue May 16 2017, 01:15 PM
gangusa
Mon May 15 2017, 04:34 AM
raghuzala
Sun May 14 2017, 02:32 PM
Prakashlimbachiya
Sat May 13 2017, 07:34 AM

Online

Guests: 44, Members: 1 ...
rapushh viewing chatbox_menu.php

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

Members: 37829
Newest member: Gaurav9527
Forum Activity
rapushh Avatar
Posted By rapushh
Tue May 23 2017, 10:40 AM
Hi, I need to insert 3 mottorsteppers, along with ...
rapushh Avatar
Posted By rapushh
Tue May 23 2017, 10:28 AM
Hello my friends, I'm doing a 8051 project using A...
ajay_bhargav Avatar
Posted By ajay_bhargav
Fri May 19 2017, 10:17 AM
I think you are asking in the wrong forum. We do n...
ajay_bhargav Avatar
Posted By ajay_bhargav
Fri May 19 2017, 10:16 AM
You should start with something, We will help you ...
ajay_bhargav Avatar
Posted By ajay_bhargav
Fri May 19 2017, 07:01 AM
To me it looks like your development environment i...
ExperimenterUK Avatar
Posted By ExperimenterUK
Thu May 18 2017, 11:28 PM
Linux can be a minefield of make files, scripts an...
ExperimenterUK Avatar
Posted By ExperimenterUK
Thu May 18 2017, 11:18 PM
Can you provide me a demo of XAG-49 counter so tha...
Utsavi Avatar
Posted By Utsavi
Thu May 18 2017, 05:57 AM
HelloThanks for reply.No the input pin is not faul...
ExperimenterUK Avatar
Posted By ExperimenterUK
Wed May 17 2017, 07:38 PM
Just from reading the data sheet you seem to doing...
Utsavi Avatar
Posted By Utsavi
Wed May 17 2017, 11:01 AM
HelloI am working with PXAG49KBA. In my project I ...