Sam Trenholme's webpage
This article was posted to the Usenet group alt.hackers in 1995; any technical information is probably outdated.

First Post/Microcontroller Hack


Article: 7663 of alt.hackers
From: jbragg@seas.gwu.edu (Julian A. Bragg)
Newsgroups: alt.hackers
Subject: First Post/Microcontroller Hack
Date: 14 Apr 1995 20:29:27 -0400
Organization: The George Washington University, Washington DC
Lines: 29
Approved: If you can read this...yes.
Message-ID: 3mn417$bqo@felix.seas.gwu.edu
NNTP-Posting-Host: 128.164.9.3
Status: RO

  I haven't yet found an efficient way to get messages through, but I
think this might work...  In case it does, here's my

ObHack:
  I was using a PIC 16C71 microcontroller to build a serially controlled
ADC that would, among other things, be able to select one of four inputs
for conversion.  The box would sit in an idle state until it received a
byte through the serial connection, at which point it would use the
first two bits to control an analog MUX, connecting the target channel
to the rest of the processing circuitry.

  I was having some trouble with HF noise, mostly from the RS-232
driver, so I ended up having to put lowpass filters on the leads that
passed the processed signals into the microcontroller, right at the ADC
input.  This appeared to be working fine, until...

  Problem: Having the MUX select a new channel caused an abrupt shift in
the voltage being sent through the processing portion and the filters.
The filters would dutifully cut out all of the high frequency
components, leaving me with an ADC input that would eventually reach the
desired level, but only if given a pretty significant time delay to
allow the filters to respond.

  Solution: I rewrote the byte reception routine so that instead of
grabbing all 8 bits, it would just get the first two and then
immediately set the MUX.  The routine would then pick up the next 6
bits, while the filters had a good 6 or 7 time constants to adjust as
the rest of the byte came in.  Net result: I gave the filters the delay
they needed with no loss of total system speed.  I was pleased...



Back to index