Why don't you try ATMEGA8.
--- On Wed, 8/5/09, Yingdan <yingdanh@gmail.com> wrote:
From: Yingdan <yingdanh@gmail.com>
Subject: [AVR-Chat] 16f88 vref problem
To: AVR-Chat@yahoogroups.com
Date: Wednesday, August 5, 2009, 9:41 AM
Hello,
I am using VREF+ and AVss for a potentiometer. Below is my setting:
status_rp = 01 -- select bank 1
CVRCON = 0b_1110_0110
ANSEL = 0b_0001_1001
ADCON1 = 0b_0010_0000 -- VREF+/AVSS
status_rp = 00 -- select bank 0
The VREF+ pin gives ~1.2v and I can get the reading 0 - 255 in the range of 0 - ~1.2v. The problem is the reading is unstable. When I rotate the shaft from high to low, and low to high, I got different readings for a specific position. From high to low, I got a relative bigger reading and from low to high, I got a much smaller reading for the similar position.
I have no idea how to fix the problem. Can anyone help to take a look at my CVRCON and ADCON1 registers since I am not confident with them, or offer any help about what might be wrong?
Your help is highly appreciated,
Yingdan
[Non-text portions of this message have been removed]Message
Re: [AVR-Chat] 16f88 vref problem
2009-08-05 by Dao Viet Dung
Attachments
- No local attachments were found for this message.