Searching \ for 'RCTIME command with the 16C84 ?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=16C
Search entire site for: 'RCTIME command with the 16C84 ?'.

Truncated match.
PICList Thread
'RCTIME command with the 16C84 ?'
1997\03\03@000425 by James and Iliana Holbrook

flavicon
face
Hello,
       As a beginner with PIC's I don't have the programming skills to implemen
t
a function that I would like to use. I have worked with the BASIC STAMP 2
and would like to make a function that is available on the BS2. It's called
the RCTIME command and what it does is read a resistive value by charging
up a capacitor and measuring how long it takes to discharge through an
unknown resistor.
       My idea is to make a pin an output for a fixed length of time, change to
input and loop until it went low, count the loops and return with the value.
       Does this sound crazy ?? Would I be wasting my time trying to debug some
code for this function ??
       Any ideas would be appreciated. I'm using a 16C84 with a 4 mhz osc.
       My goal is to read a photoresistor.
       Thanks !!
James and Iliana Holbrook
Austin Texas
Electronic hobbiest
Automotive Technician
Software Engineer

1997\03\03@002052 by tjaart

flavicon
face
James and Iliana Holbrook wrote:
>
> Hello,
>         As a beginner with PIC's I don't have the programming skills to
implement
> a function that I would like to use. I have worked with the BASIC STAMP 2
> and would like to make a function that is available on the BS2. It's called
> the RCTIME command and what it does is read a resistive value by charging
> up a capacitor and measuring how long it takes to discharge through an
> unknown resistor.
>         My idea is to make a pin an output for a fixed length of time, change
to
> input and loop until it went low, count the loops and return with the value.
>         Does this sound crazy ?? Would I be wasting my time trying to debug
some
> code for this function ??
>         Any ideas would be appreciated. I'm using a 16C84 with a 4 mhz osc.
>         My goal is to read a photoresistor.
>         Thanks !!

Go for it - it works well. Here's a starting point :

             5V
             ---
              |
              |
              /
              \
              /   Light Dependant Resistor
              \
              /
    220 Ohm   |
----/\/\/\-----|
              |
              |
             ---
             ---  Cap
              |
              |
            -----
             ---
              -
You can use the formula : Time = LDR*Cap.
Don't leave out the current limiting resistor!


--
Friendly Regards

Tjaart van der Walt
spam_OUTtjaartTakeThisOuTspamwasp.co.za
_____________________________________________________________
| Another sun-deprived R&D Engineer slaving away in a dungeon |
|             WASP International  http://wasp.co.za           |
|             GSM and GPS value-added applications            |
|  Voice : +27-(0)11-622-8686   |   Fax : +27-(0)11-622-8686  |
|_____________________________________________________________|

1997\03\04@105559 by Joe McCauley

flavicon
face
If you check out Microchip's web site (Sorry I don't have the address to hand),
I think you will find an app note which does this.

Joe

At 23:03 02/03/97 -0600, you wrote:
>Hello,
>        As a beginner with PIC's I don't have the programming skills to
implement
>a function that I would like to use. I have worked with the BASIC STAMP 2
>and would like to make a function that is available on the BS2. It's called
>the RCTIME command and what it does is read a resistive value by charging
>up a capacitor and measuring how long it takes to discharge through an
>unknown resistor.
>        My idea is to make a pin an output for a fixed length of time,
change to
>input and loop until it went low, count the loops and return with the value.
>        Does this sound crazy ?? Would I be wasting my time trying to debug
some
>code for this function ??
>        Any ideas would be appreciated. I'm using a 16C84 with a 4 mhz osc.
>        My goal is to read a photoresistor.
>        Thanks !!
>James and Iliana Holbrook
>Austin Texas
>Electronic hobbiest
>Automotive Technician
>Software Engineer
>
P.J. McCauley                                   Tel.  353-1-6082218
Dept. Of Pure and Applied Physics,              Fax.  353-1-6711759
Trinity college,
Dublin 2,
Ireland.

More... (looser matching)
- Last day of these posts
- In 1997 , 1998 only
- Today
- New search...