CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

IR program

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Sparta



Joined: 22 Oct 2009
Posts: 6

View user's profile Send private message

IR program
PostPosted: Tue Oct 27, 2009 7:12 pm     Reply with quote

Hi...Anyone know how to write IR sensor program?
picfreak



Joined: 26 Oct 2009
Posts: 16

View user's profile Send private message

PostPosted: Tue Oct 27, 2009 8:37 pm     Reply with quote

u can connect ir sensor in adc and as well as in digital pin........
if u interfacing a sensor first u have to check whether it works in digital are analog then u can procede........
then if its analog device then u have to find minimum and maximum value of it..... if its digital device no problem only logic 1(high) and logic (low)

algorithm in digital:
define controller pin as input if sensor is detected then it shows logic 1(high) u decide what operation to do...... if ir not detected then its shows logic 0(low) u decide what operation to do.......

algorithm in analog:
for analog u have to find minimum and max value using adc module
then u can write up in same procedure as digital ...minimum value is low and maximum value is high.......

try to write program of your own if not works then we can debug it why not working


best wishes
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group