DPRG List  

[DPRG] reading a Cds via Port E on a HC11 (software)

Subject: [DPRG] reading a Cds via Port E on a HC11 (software)
From: montgomery f. tidwell mtidwell at practicalmatters.com
Date: Mon Jun 25 09:29:56 CDT 2001


ok, i'm a goober (very technical term)

it was hardware. i found a reference to a light sensor that Karl Lunt
did for Nuts&Volts. even more amazing is that sometime in the recent
(forgotten) past i had ordered that specific issue (June 1996) and
had it sitting on the shelf.

using that diagram, i modified my sensor and now it actually works
quite well.


"montgomery f. tidwell" wrote:
> Howdy,
> ok, i think i've got the hardware part. now i need some help with
> the software.
> here is the routine that i'm using
> /* the Cds is connected to PORT E pin 0 */
> OPTION |= 0x80;
> ADCTL = 0x10;
> while(1)
> {
>    while((ADCTL&0x80)==0);
>    printf("%d, %d, %d, %d\n",ADR1,ADR2,ADR3,ADR4);
>    ADCTL = 0x10;
> }
> the values that printout do seem to change, but not in response
> to anything that i do to the Cds.
> does this snippet look like it should work?
>                             \\//_
> _______________________________________________
> DPRGlist mailing list
> DPRGlist at dprg.org
> http://nimon.ncc.com/mailman/listinfo/dprglist

More information about the DPRG mailing list