Editing Experimenting with IR Remotes using a PIC running BoostC Project

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 2: Line 2:
  
 
*Name: Experimenting with IR Remotes using a PIC running BoostC Project
 
*Name: Experimenting with IR Remotes using a PIC running BoostC Project
*Status: done, until enhanced
+
*Status: draft almost ready
 
*Technology: PIC microcontroller, slavaged IR reciever, running with code in BoostC  
 
*Technology: PIC microcontroller, slavaged IR reciever, running with code in BoostC  
 
*Author: [[russ_hensel]] ( where you can find an email address to reach me )
 
*Author: [[russ_hensel]] ( where you can find an email address to reach me )
Line 12: Line 12:
  
 
Platform: PIC16F877A using BoostC connected via rs232 to a PC running a terminal program.  The PIC chip is supplemented with a slavaged IR reciever.
 
Platform: PIC16F877A using BoostC connected via rs232 to a PC running a terminal program.  The PIC chip is supplemented with a slavaged IR reciever.
 
This code may be used as part of a user interface into a larger project.  One pin supports all the buttons on a remote, and a universal remote is only about $10. and works remotely.
 
  
 
== Hardware ==
 
== Hardware ==
Line 192: Line 190:
  
 
=== Design -- Polling Routine ===
 
=== Design -- Polling Routine ===
 
The code in the download files is the project \IR.
 
  
 
If you look at the subroutine readIR( void ) you will see the heart of the IR receive.  The routine loops each time checking to see if the output of the detector has changed.  If it has not it adds one to the period, if it has it records the period and resets the period to 0.  When the input goes quiet for a while it is taken as the end of the signal and we exit. Pretty simple.
 
If you look at the subroutine readIR( void ) you will see the heart of the IR receive.  The routine loops each time checking to see if the output of the detector has changed.  If it has not it adds one to the period, if it has it records the period and resets the period to 0.  When the input goes quiet for a while it is taken as the end of the signal and we exit. Pretty simple.
Line 286: Line 282:
  
  
=== Design -- Interrupt Driven Routine ===
+
=== Design Interrupt Driven Routine ===
  
This is similar to the design above but the IR sections have be rewritten to use interrupts.  For an explanation see: [[A Tutorial on PIC interrupts using BoostC including Example Programs]] The code in the download files is the project \IIR.  This version is probably much better for use in a project than the non interrupt code, but was harder to code, and may be harder to understand.  It only decodes the NEC ( inc Toshiba ) codes, others are logged for timing.
+
This is similar to the design above but the IR sections have be rewritten to use interrupts.  For an explanation see: [[A Tutorial on PIC interrupts using BoostC including Example Programs]]
  
 
=== Notes on the NEC Decoding ===
 
=== Notes on the NEC Decoding ===
Line 329: Line 325:
 
== Download ==
 
== Download ==
  
[http://home.comcast.net/~russ_hensel/OC/IRCode.zip   Both sets of code in IRCode.zip]
+
pending, not at: [http://home.comcast.net/~russ_hensel/OC/StepperTest_v1.zip Version 1 zip file: StepperTest_v1.zip]
  
 
== Comment, Questions, Contributions? ==
 
== Comment, Questions, Contributions? ==
Line 335: Line 331:
 
Email me [[russ_hensel]], or use the talk page for this topic.  All feedback is welcome.
 
Email me [[russ_hensel]], or use the talk page for this topic.  All feedback is welcome.
  
[[category:projects]][[category:Serial Communications]][[category:Microcontroller]][[category:PIC]][[category:BoostC]]
+
[[category:projects]]

Please note that all contributions to OpenCircuits may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see OpenCircuits:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)