free 8051 Microcontroller Projects AVR PIC Microcontroller Projects Tutorials Ebooks Libraries, interfacing tutorials, lcd tutorial, stepper motor, dc motor 8051 assembly language programming electronics and communication ECE CSE pdf ebooks library BE final year project ideas Embedded systems

 
8051 microcontroller 8051 microcontroller
Forums

8051 Microcontroller Projects AVR PIC Projects Tutorials Ebooks Libraries codes :: Forums :: Discuss and Learn :: General help Guidance and Discussion
 
<< Previous thread | Next thread >>
IR based home automation HOW TO COUNT THE PULSE CODE MODULATION OUTPUT
Go to page  1 [2]
Moderators: Ajay, Junied , abbas1707, Arun Kumar V, pdi33, Shailesh NAYAK, ۞ TPS ۞, shyam, sashijoseph
Author Post
pdi33
Sat Jul 12 2008, 11:52AM

 User Offline
Registered Member #1329
Joined: Mon Jun 04 2007, 09:28AM

Posts: 770
Thanked 185 times in 180 posts
well, if there are two timer/counters in the PIC,i think u may need both of them, one in the counter mode to count the pulses and one in the timer mode (internal clock) to measure the time. just start the timer and counter simultaneously and read the counter value when the internal timer reaches a fixed pre determined value.



* inspired to develop,developing to inspire *
Back to top



This post has been thanked 1 time
sashijoseph
Sun Jul 13 2008, 12:01AM

 User Offline
Registered Member #5870
Joined: Mon Feb 04 2008, 06:26PM

Posts: 648
Thanked 137 times in 130 posts
Guys,I think the OP wants to decode the RC5 codes rather than count pulses.

Calling electronicfreak....... do you want to decode the RC5 pulses in order to determine which key was pressed or do you want to count the number of pulses received?

Let there be music........
Back to top



This post has been thanked 1 time
pdi33
Sun Jul 13 2008, 12:02AM

 User Offline
Registered Member #1329
Joined: Mon Jun 04 2007, 09:28AM

Posts: 770
Thanked 185 times in 180 posts
right arun , i got it now.
actually , i was thinking on the lines that the pulses are continuous, but the IR sensor would give a burst of pulses which can happen randomly in real time so yes, u need the interrupt to sense when that occurs, right?

good thinking .


* inspired to develop,developing to inspire *
Back to top



This post has been thanked 1 time
electronicfreak
Sun Jul 13 2008, 09:44PM
 User Offline
Registered Member #7958
Joined: Tue May 20 2008, 04:48PM

Posts: 19
Thanked 0 times in 0 posts
sashijoseph wrote ...

Guys,I think the OP wants to decode the RC5 codes rather than count pulses.

Calling electronicfreak....... do you want to decode the RC5 pulses in order to determine which key was pressed or do you want to count the number of pulses received?

i want to determine which key was pressed .. which ever the way ,its counting pulses of the burst or the other


SACHIN
http://belgaum.myminicity.com/
Back to top


Ajay
Mon Jul 14 2008, 08:05AM
Rickey's World Admin

 User Offline

Registered Member #1
Joined: Fri Feb 24 2006, 04:56AM

Posts: 4035
Thanked 751 times in 710 posts
Electronicfreak, he is not angry on anyone

Please take it lightly..

anyway.. there are number of ways you can decode the IR signal. as i told you my asm code do the same. you can take it as a reference.

I have considered the fixed timing of IR signal which is known as per RC5 protocol. other way is you calculate the timing on runtime by using timer controlled by interrupt.

If you do the timer way, your program will become clock frequency independent. So you can use either way you want.

You can download the code from download section and test it and analyze it carefully.

www.rickeyworld.info
If you feel satisfied with the user's forum reply please click on the thank button.

Obey forum rules!
Respect others!
Back to top


Go to page  1 [2]  

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System

8051 Microcontroller Projects 8051 AVR tutorials PIC microcontroller, 8051 assembly language programming electronics and communication ECE CSE pdf ebooks library BE final year project ideas Embedded systems