This Forum is Dedicated For all The Object Oriented PIC Lovers .......... The concept behind OOPic is straight forward. Use preprogrammed multitasking Objects from a library of highly optimized Objects to do all the work of interacting with the hardware. Then write small scripts in Basic, C, or Java syntax styles to control the Objects. During operation, the Objects run continuously and simultaneously in the background while the scripts run in the foreground telling the objects what to do.

Wednesday, November 28, 2007

[oopic] Re: A2D Troubles

--- In oopic@yahoogroups.com, "Fiebigc" <fiebigc@...> wrote:
>
> I'm relatively green with the OOPic and I'm trying my first A2D
> connection. I have the OOPic connected to an LCD that I've tested
> throughly that displays the values of the A2D. My problem is that it
> gives a nominal value for the voltage that fluctuates around 512. It
> does give meaningful values from 2.5v to 5v but nothing below that.
> Does anyone know what I'm doing wrong? Thanks.
>
> Here is my code snippet. I've left out the LCD stuff for brevity.
>
> Dim volt As New oA2D10
>
> Sub main()
>
> volt.IOLine = 1
> volt.Operate = 1
>
> do
> LCD.String = STR$(volt.Value) 'Outputs data to display on LCD
> OOPic.delay = 10
> Loop
>
> End Sub
>

What is driving the A2D input? There is a maximum driving impedance
of 2.5k ohms.

Is the signal ground from the input device tied to ground for the OOPic?

Try using a 10k pot with the ends tied to Vcc and Gnd through 220 ohm
resistors. Connect the wiper to the A/D input. The 220 ohm resistors
protect the OOPic in case the pin is accidentally configured as a
digital output and the pot is at an end position.

Richard



Yahoo! Groups Links

<*> To visit your group on the web, go to:

http://groups.yahoo.com/group/oopic/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:

http://groups.yahoo.com/group/oopic/join

(Yahoo! ID required)

<*> To change settings via email:
mailto:oopic-digest@yahoogroups.com
mailto:oopic-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
oopic-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:

http://docs.yahoo.com/info/terms/

No comments: