[sci.electronics] Help w/Moto 68HC11 board!

jbritt@hobbes.catt.ncsu.edu (Joe Britt) (11/29/90)

Help!

A friend of mine just got one of those 68HC11 evaluation boards from
Motorola.  One project idea we had for it needs the A/D converter, 
so we decided to try hooking up a potentiometer as a voltage divider
just for initial experimentation.

We connected VrefHI to +5v and VrefLO to ground.  We connected one side
of the pot to +5, the other side to ground, and the center lug tothe A/D
input (Port E, bit 0).  Then we wrote this simple little program to 
grab bytes from the A/D converter and dump them out to the terminal
port.

We get stuff from the converter, but it looks screwy.  Looking at the
pot's output with a voltmeter, we see a nice (LINEAR) swing from 0 to
5v.  What we see on the terminal screen though, is usually one of 2
values:  AA or 55.  Sometimes it won't be so distinct, and it will 
oscillate between several values.

The program is super-simple:  once the a/d is set up, it waits (counts
down from $ff), grabs a sample, then counts down again.

What are we missing?  Has anyone successfully used the a/d converter
on one of these boards?

muchos thanks in advance,

jbritt@eceugs.ncsu.edu


--
    << jbritt@hobbes.catt.ncsu.edu >>       No Other Possibility.       
   You're going to have to shoplift from SafeMuffins.  Yes, you're   
     going to have to shoplift the HR Steamcleaning System from     
  			    SafeMuffins....