PART 1 : Basic Introduction
PART 2 : Interrupt
PART 3 : Timer
PART 4 : Calculation
PART 5 : LED Switching Project [END]
Introduction and Some Basic Descriptions :
IR means Infrared light . Generally Infrared light is invisible to us .We can find this in our TV remote controlling system. It's very popular and widely used in wireless technology and it's really cheap to buy . You can find more details in Google . In this tutorial I will try my best to make you understand . I will try to skip complexity .
We will also try this for communication between two pic microcontrollers . When IR-LED remains ON, it transmits 36KHz IR signal continuously. When IR-LED remains OFF there is no signal.
Now take a look on IR-Led (Transmitter) and IR Receiver
Picture of Transmitter Module:
![]() |
Infrared LED (Transmitter Modude) |
Picture of TSOP38236(36 KHz) Receiver Module:
![]() |
TSOP38236 Receiver Module |
What happens in IR communication ? We transmit a signal in a systematic procedure through Transmitter Unit and Receiver Unit receives that signal .
Transmitter Unit's Working
Transmitter Unit's Working

IR (Infrared) Remote Control Communication Between Two Microcontroller

![]() |
This picture edited from a picture of https://learn.sparkfun.com |
The transmitting signal is a combination of pulses . Consider we would like to send 4 bit data(1011) through transmitter then we might set unique identification for each bit .
For example,
we can use (562 us ON & 16875 us OFF ) for Logical 1
we can use (562 us ON & 16875 us OFF ) for Logical 1
and (562 us ON & 562 us OFF ) for Logical 0.
By measuring the time duration of each pulse, we can identify each bit in receiver unit.
By measuring the time duration of each pulse, we can identify each bit in receiver unit.
If we want to get the receiver to receive the signal, then we have to follow the systematic procedure.
That means , if we want to send 1011, first we need to send a start signal. After sending all data we need to send an ending signal. Actually we need to send start signal to get MCU ready to fetch data accurately.
That means , if we want to send 1011, first we need to send a start signal. After sending all data we need to send an ending signal. Actually we need to send start signal to get MCU ready to fetch data accurately.
[ start_signal + 1101(reverse)+1011(main)+ ending_signal ] Total Signal
Now the question is how much time should be selected . We will use NEC Protocol's data type.You can use your own . Generally most of devices are using NEC Protocol. In NEC Protocol data contains
[ start signal + 8bit Address+ Reverse 8bit Address+ 8 bit Command
Start Signal : 9 ms ON and 4.5 ms OFF
(You can use as your wish but should be grater than bit's pulse)
Logical 1: 562 us ON and 16875 us OFF
Logical 0: 562 us ON and 562 us OFF
In this tutorial, we will use 4 bit data signal and we will use only data type .Our signal will be like this .
Start + (reverse 4 bit command & 4 bit command Combination total 8bit) + End
When IR-Led turns OFF or no signal comes to IR-Receiver, IR-Receiver provides 5v or high output to microcontroller's external interrupt pin .When IR-Transmitter turns ON, IR-Receiver provides 0v or low.
![]() |
IR (Infrared) Remote Control Communication Between Two Microcontroller |
Transmitter unit sends Start Signal 9 ms ON and 4.5 ms OFF consequently IR-Receiver provides 9 ms OFF(0v) and 4.5 ms ON(5v) .
After finishing this stage when first bit is sent, transmitter sends out pulse 562us ON and 562us OFF and consequently IR-Receiver provides 562us ON(5v) and 562us OFF(0v) . That will make external interrupts on microcontroller and timer0 will start to count duration of time so that each bit can be uniquely identified .In this way all bit's comes to the receiver unit . Finally we need to get our microcontroller understand about ending of signal and we send last signal pulse .
So First we need Interrupt to ditect signal .
Secondly , we need timer to measure time duration of signal so that we can identify each bit from signal (0 or 1). We also need PWM (Pulse width Modulation).
Thank You for the given Information|||Here You can get latest Govt Job Updates
ReplyDeleteGovt Jobs 2016
ReplyDeleteIf I change the frequency to 38kHz (changing the receiver and the transmitter to 38kHz as well) how would the new communication
Then you just need to create 38kHz freqyuency using PWM on transmitter section. Receiver will respond to 38kHz if it's based on it.That's it.
DeleteI love the way you write and share your niche! Very interesting and different! Keep it coming! 2 way radio
ReplyDeleteThank you.
DeleteI got what you mean , a debt of gratitude is in order for posting .Woh I am cheerful to discover this site through google.
ReplyDeleteOnline Web Hosting Services
i read a lot of stuff and i found that the way of writing to clearifing that exactly want to say was very good so i am impressed and ilike to come again in future.. création de site internet
ReplyDeleteAmazing article, thanks for sharing this valuable blog. Visit Ogen Infosystem for responsive website design and SEO Services in Delhi, India at an affordable price.
ReplyDeleteSEO Services in Delhi
Thank you very much for this useful article. I like it. WordPress Developer Brisbane
ReplyDeleteThis is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free.
ReplyDeleteclick here
I really appreciate this wonderful post that you have provided for us. I assure this would be beneficial for most of the people.
ReplyDelete먹튀검증커뮤니티
Thanks on your marveous posting! Greetings! 먹튀사이트 I'm glad to see such a good comment.
ReplyDeletebest by introducing verification and verification companies. Plz answer back as I’m looking to construct 먹튀신고
ReplyDeleteKeep working like that!. back scratcher shoe horn Thanks so much for the post.Thanks Again 보증업체
ReplyDeleteI really appreciate this wonderful post that you have provided for us. I assure this would be beneficial for most of the people.
ReplyDeletebest credit card processing companies to work for
thanks for this usefull article, waiting for this article like this again.
ReplyDeleteselling merchant services
I recently came across your blog and have been reading along. I thought I would leave my first comment. I don't know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.
ReplyDeletebuy pregabalin
ReplyDeleteThis is very educational content and written well for a change. It's nice to see that some people still understand how to write a quality post!
North American Bancard Partners
saved this to my favorite so I can read it again every time sharing all of the awesome info! I am looking forward to checking out more 메이저놀이터
ReplyDeletethanks will not just be sufficient, for the fantasti c lucidity in your writing. I will instantly grab your rss which is good in favor of my know-how 토토사이트검증
ReplyDeletePlz answer back as I’m looking to construct 보증업체 I'm surprised there's such a wonderful article
ReplyDeleteWe promise to do our This is a pure nice post. This is the kind of info that should be shared across the net. 먹튀폴리스
ReplyDelete카지노커뮤니티 I can grow up with. Please continue to do well and always do well I live in a different country than you
ReplyDeletethanks for this usefull article, waiting for this article like this again.
ReplyDeletebecome a credit card processing agent
Yes i am totally agreed with this article and i just want say that this article is very nice and very informative article.I will make sure to be reading your blog more. You made a good point but I can't help but wonder, what about the other side? !!!!!!THANKS!!!!!!
ReplyDelete토토사이트
Yes i am totally agreed with this article and i just want say that this article is very nice and very informative article.I will make sure to be reading your blog more. You made a good point but I can't help but wonder, what about the other side? !!!!!!THANKS!!!!!!
ReplyDeleteVende Ethereum Colombia
I wish more authors of this type of content would take the time you did to research and write so well. I am very impressed with your vision and insight. 안전놀이터
ReplyDeleteYou make so many great points here that I read your article a couple of times. Your views are in accordance with my own for the most part. This is great content for your readers. 먹튀검증
ReplyDeleteAn interesting dialogue is price comment. I feel that it is best to write more on this matter, it may not be a taboo topic however usually individuals are not enough to talk on such topics. To the next. Cheers. 안전놀이터
ReplyDeleteHey There. I found your blog using msn. This is a very well written article. I’ll be sure to bookmark it and come back to read more of your useful info. Thanks for the post. I’ll definitely return. 메이저사이트
ReplyDeleteSomeone Sometimes with visits your blog regularly and recommended it in my experience to read as well. The way of writing is excellent and also the content is top-notch. Thanks for that insight you provide the readers! 먹튀검증업체
ReplyDeleteGood website! I truly love how it is easy on my eyes it is. I am wondering how I might be notified whenever a new post has been made. I have subscribed to your RSS which may do the trick? Have a great day! pii-email
ReplyDeleteMerely a smiling visitant here to share the love (:, btw outstanding style. academic transcription services
ReplyDeleteI can’t imagine focusing long enough to research; much less write this kind of article. You’ve outdone yourself with this material. This is great content. 먹튀검증
ReplyDeleteGreat post, you have pointed out some fantastic points , I likewise think this s a very wonderful website. สล็อตออนไลน์
ReplyDeleteI really like your writing style, great information, thankyou for posting. 토토사이트
ReplyDeleteMerely a smiling visitant here to share the love (:, btw outstanding style. nursing test bank
ReplyDeleteThis is my first time i visit here. I found so many interesting stuff in your blog especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here keep up the good work nex777
ReplyDeleteI really appreciate this wonderful post that you have provided for us. I assure this would be beneficial for most of the people. 안전놀이터
ReplyDeleteI found this is an informative and interesting post so i think so it is very useful and knowledgeable. I would like to thank you for the efforts you have made in writing this article. 파워볼게임
ReplyDeleteThanks for posting this info. I just want to let you know that I just check out your site and I find it very interesting and informative. I can't wait to read lots of your posts. 대전건마
ReplyDeleteI encourage you to read this text it is fun described ... https://dynamichealthstaff.com/nursing-jobs-in-canada-for-indian-nurses
ReplyDeleteThank you so much for sharing this great blog.Very inspiring and helpful too.Hope you continue to share more of your ideas.I will definitely love to read. https://westasianetwork.com/
ReplyDeleteIn this article understand the most important thing, the item will give you a keyword rich link a great useful website page: https://visualaidscentre.com/service/c3r-surgery/
ReplyDeletewow this saintly however ,I love your enter plus nice pics might be part personss negative love being defrent mind total poeple , http://chezhelenoise.com/does-lasik-surgery-affect-night-vision/
ReplyDeleteThanks for writing such a good article, I stumbled onto your blog and read a few post. I like your style of writing... https://www.techsite.io/p/2560737/t/how-woocommerce-newsletter-plugin-will-boost-your-sales
ReplyDeletewow this solid in any case ,I love your enter offering little appreciation to astonishing pics might be part personss not all around occupied with sexual relations being defrent mind gutsy poeple , https://zetamatic.com/downloads/woocommerce-mailchimp-newsletter-discount/
ReplyDeleteThis is particularly surprising, at any rate it is head for tap on this interest: https://www.buyyoutubeviewsindia.in/youtube-marketing/
ReplyDeleteI was reading your article and wondered if you had considered creating an ebook on this subject. Your writing would sell it fast. You have a lot of writing talent. 먹튀검증
ReplyDeleteThis is a great post. I like this topic.This site has lots of advantage.I found many interesting things from this site. It helps me in many ways.Thanks for posting this again. industrial tunnel oven
ReplyDelete바카라사이트
ReplyDeleteHello I am so delighted I located your blog, This is my website and it has been very helpful.Teit hienoa työtä. Erittäin luettava ja älykäs. Teit jopa helpon ymmärtää ja lukea. Sinulla on todellinen kirjoitustaito. Kiitos.
Friend, this web site might be fabolous, i just like it. 메이저사이트
ReplyDeleteswagbucks
ReplyDeleteAdsRePay is an online rewards and cashback site. It's completely FREE to register and use, and best of all, you can start earning right away. Complete simple offers from our partners, earn points and then simply redeem your points anytime for instant Paypal and Amazon Gift Cards
Whatever a technician can do with control of your mouse and keyboard sitting in front of your computer, can also be done how to connect wifi to samsung tv over the internet. This includes downloading and installing any programs necessary to repair your Windows installation, such as for virus and spyware removal. Even so, most computer users in general have never considered "remote" computer services for their computer repair and maintenance needs.
ReplyDeleteI hope you prosper a lot and please post good comments often. I come often. 안전토토
ReplyDeleteWhy do only so much written on this subject? Here you see more. https://www.buyyoutubesubscribers.in/2022/01/10/which-youtuber-has-the-most-subscribers/
ReplyDeleteCool concept. I coded back in the day but Fortran isn't popular any more.
ReplyDeleteflooring company
Very informative. Coding is lightyears beyond where it was a few short years ago.
ReplyDeletefence company
Best online slots in 2021 | CasinoHemp.com
ReplyDeleteBest Online Slots in 2021: ✓ Play the best online slots 보령 출장샵 There 동해 출장마사지 are different types 구리 출장안마 of casino games that you can play 아산 출장샵 online for free at 부산광역 출장마사지
Very cool stuff on your site. Informative.
ReplyDeletehouse painter
Thanks for your post. The article is neatly organized with the information I want, so there are many things to refer to. 먹튀검증커뮤니티
ReplyDeleteI’m really happy to say it was an interesting post to read. I learned new information from your article on imt cdl assignments
ReplyDelete, you are doing a great job