To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.handyboardOpen lugnet.robotics.handyboard in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / Handy Board / 5166
5165  |  5167
Subject: 
digital and analog port on HD
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Sun, 17 Jan 1999 10:16:03 GMT
Original-From: 
phillip chia <philchia@singnet.com.SPAMCAKEsg>
Viewed: 
978 times
  
Hi,
I want to use the digital port as an  analog port input.  How should I
convert the digital port to analog in using programming way ? I do not
quite understand the explanation on the technical manual handout. if
possible, how to convert the analog port to digital port also using
programming . Please advice.

It is like that, please correct if wrong :-

if (analog (12) <127)
{ ..............
  .............
}

else if  (digital (3)  == 1)
{  .................
  '..................
}


rgds,
phillip chia



Message has 2 Replies:
  Re: digital and analog port on HD
 
(...) A digital port can't have the capability of an analog port, since it has only one bit of information with which to work. (A 256-value analog port has eight bits.) You could perhaps hook an analog sensor up to a digital port using some sort of (...) (26 years ago, 18-Jan-99, to lugnet.robotics.handyboard)
  Re: digital and analog port on HD
 
(...) Just thought I would add that it *is* possible (if a bit slow) to read an analog signal w/ a digital port by timing the decay of the signal thru a RC circuit...not a particularly precise method, either. < Watching for the Fedex guy bringing my (...) (26 years ago, 18-Jan-99, to lugnet.robotics.handyboard)

3 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR