Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Decoding IR remote with PIC

Status
Not open for further replies.

picman2

Member level 2
Joined
May 18, 2001
Messages
51
Helped
2
Reputation
4
Reaction score
0
Trophy points
1,286
Activity points
363
pic ir decoder

I need to decode an IR remote control, one of those "simple TV remote control" with only 6 keys, with a PIC 16F628 (or F84)

Any hint ?

TIA

PicMan
 

Fragrance

Advanced Member level 4
Joined
Jul 26, 2002
Messages
1,191
Helped
248
Reputation
496
Reaction score
200
Trophy points
1,343
Location
East Of Earth
Activity points
8,917
ir remote decoder

picman2 said:
I need to decode an IR remote control, one of those "simple TV remote control" with only 6 keys, with a PIC 16F628 (or F84)

Any hint ?

TIA

PicMan

i am on leave now when i back to office on monday i will upload classic thing based on pic micro which can decode both sirc and rc5 and lot other
types of code as well
 

Fragrance

Advanced Member level 4
Joined
Jul 26, 2002
Messages
1,191
Helped
248
Reputation
496
Reaction score
200
Trophy points
1,343
Location
East Of Earth
Activity points
8,917
ir decoding

hi friend

as i promise i back to office now here is the remote decoder based on pic
decode both rc5 and sirc code hope help full for you
 

dsoares

Newbie level 4
Joined
Dec 24, 2003
Messages
6
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,283
Activity points
50
ir decoder pic

Take a look in this site...

https://www.ustr.net


There is a generic algorithm for any microcontroler...



[],

Diego Soares
 

Nina555

Newbie level 5
Joined
Mar 31, 2009
Messages
10
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Location
Jordan
Activity points
1,335
pic16f628 ir

hello , i am new here
can anyone please tell me , does decoding IR remote with Pic 16f84 differ from decoding it by pic 16f628 ?
please anyone reply
 
  • Like
Reactions: bangla

    bangla

    Points: 2
    Helpful Answer Positive Rating

btbass

Advanced Member level 5
Joined
Jul 20, 2001
Messages
1,897
Helped
438
Reputation
880
Reaction score
287
Trophy points
1,363
Location
Oberon
Activity points
12,863
sirc decoding

Not a lot, they use the same assembly language and share common peripherals.
One might have more peripheral modules than the other.
 

    V

    Points: 2
    Helpful Answer Positive Rating

drdigital

Junior Member level 3
Joined
Apr 13, 2009
Messages
31
Helped
5
Reputation
10
Reaction score
4
Trophy points
1,288
Activity points
1,525
pic remote control decoder

IR signals are decoded by many techniques according to the manufacture.You have RC5,Sony, Hitchi,.. etc.

I recommend for you to choose a RC5 remote control and decode its signal (Philips remote for example ).This is the easiest one.

This Link will help you much to understand how to decode the RC5- IR signals
https://www.ustr.net/infrared/index.shtml
 

bala.hema

Newbie level 2
Joined
Aug 20, 2010
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
vignan
Activity points
1,292
Re: pic remote control decoder

I am trying to service an old set up that is using a remote for controlling some devices.
The remote is generating signals and i have a receiver which is giving 5 volt logic levels.
I do not know how to decode these signals and how to identify in which format they are present.
 

hrdevsingh

Newbie level 2
Joined
May 31, 2009
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,292
Decoding IR formats

Dear Bala.Hema

To decode unknown formats, Use Digital Storage Oscilloscope or Pickit2 from Microchip to capture data emitted by IR LED by connecting output of IR receiving module to DSO or Pickit2. Compare the captured data with various formats to find the right format. We have decoded N Numbers of remote with this technique.
 

FATechMan

Newbie level 4
Joined
Jan 12, 2012
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,398
Just to clarify, when you say your receiver is producing 5V logic levels, you mean that it is sensing the IR signals emitted from the existing remote control?
Is your receiver interfaced to your PIC yet? If not, are you comfortable electrically connecting it to one of the input/output (I/O) ports on the PIC and then reading that port using code?

There are maybe additional ways to look at the data being transmitted by the remote to complement those suggested by other contributors. Could you, for example, write a "data logger" program which does the following (sorry, I haven't got access to the data sheet for the PIC right now so I'm not sure if the exact quantities below are reasonable or not):

1) Configure the I/O port for input from your IR receiver photodiode or whatever
2) Configure an array of, say, 2000 bytes, set to zeroes
3) Construct something like this pseudo code
START
FOR count=0 to 1999
{ read the port data
store the data into array element[count]
wait(1 ms) }
LOOP
Meanwhile, hit a specific button on the remote, aiming it at the receiver
4) Continue in the code...
FOR count=0 to 1999
{ read the array data
print the data element onto the screen (or view the array item in your micro's development environment)
print a space after that }
LOOP
END

Your "logger" should hopefully have captured 2s of port data at 1ms intervals (RAM space permitting), which you'll be able to see on the screen hopefully as a set of ones and zeroes. If you configured your port as an analogue input and used your PIC's analogue to digital converter, these values will be different, but nevertheless you should be able to see distinctly different levels from your IR sensor. You will also be able to tell the period of each logic high level (to the nearest ms), and, possibly, any repeats in the pattern, so you can ignore all but the one burst you need. From there you can do the reverse: distil the periods and levels down to a few byte values, say, and drive an IR LED from one of your output ports, simply by specifying a level and a duration, for each of the button presses you collected data for. Over time and with patience, you can build and encode in your PIC a lookup table of all the codes you want, for any number of remote controls; you'd just read whatever list of codes you need from your collection. There are other, more efficient, ways to encode bit patterns which I'm sure your readers can help with.

A handy thing about the above is that you won't need any additional kit.

Good luck!
 

jpanhalt

Advanced Member level 3
Joined
Jun 28, 2010
Messages
724
Helped
216
Reputation
442
Reaction score
219
Trophy points
1,323
Activity points
6,952
Here is a similar project from another forum: Decoding IR Control

I post it here, because the investigator used C and posted frequent progress notes to solving the puzzle. I thought they might help.

John
 

shree4u

Junior Member level 3
Joined
Nov 11, 2009
Messages
29
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Location
mumbai
Activity points
1,435

rk1genius

Newbie level 4
Joined
Dec 1, 2008
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,314

ameriq

Junior Member level 3
Joined
Oct 1, 2007
Messages
29
Helped
4
Reputation
8
Reaction score
4
Trophy points
1,283
Location
Pakistan
Activity points
1,487
Re: pic ir decoder

I have created a library for use with MikroC to decode the Sony remote controls. the library function returns a structure containing command and device.

the file is attached along with example project.
 

Attachments

  • Sony Remote.rar
    31.2 KB · Views: 141
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top