Subject: Atmel and ZBasic EFI and data acq-displays
From: Rotary Engine
Date: 5/12/2010, 11:18 AM
To: AAA Put this in the To box



I would see creating my own digital cockpit display(s) as an interesting winter project.
The programming does not scare me; since I earned a good share of my living for 30 years writing software..  However, I would need to be brought up to speed on on nature of the various sensors required for digital avionics.
As usual, I am interested in a least-cost approach ... I have more time than money.
I suspect that many sensors would be available on the surplus market, if a guy knew what to look for.
Does anyone have information on just what might work on these "experimental" systems and where they might be obtained?

Robin Berglund

DigiKey sells a lot of sensors.
FreeScale makes low cost $10 pressure sensors the same ones Tracy
uses. A lot of automotive sensors put out the industry standard
0 to 5 volts. Thermal couples are needed for EGT so a thermal
couple amplifier will be required to covert the millivolt TC
signal to 0 to 5 volts needed by one or more of the 16 analog to
digital processors in the ZBasic chip.

Here is the function you use to get the digital
value of an analog voltage appearing on Port F pins 29-36.

GetADC       (subroutine form)
Type         Subroutine
Invocation   GetADC(pin, val)
..........   GetADC(pin, val, fullScale)
..........   GetADC(pin, val, fullScale, offset)

Parameter Method Type ...  Description
pin.....  ByVal  Byte ...  The pin from which to read an analog voltage.
val.....  ByRef  Single..  The variable in which to return the result.
fullScale ByVal  Single..  The full-scale voltage value.
offset..  ByVal  Integral  The offset to apply before scaling.


Discussion
This function performs an analog-to-digital conversion on
the signal present on the specified pin that must be one of
the analog port pins.  The return
value will be a 10-bit digital approximation of the input
voltage with a range from zero to the AVcc reference
voltage (usually +5 volts).  For the first form, the
returned value is scaled to the range 0.0 to 1.0 and for
the remaining forms it is scaled to the range 0.0 to value
of the fullScale parameter.  For the third form, the value
of the offset parameter (which could be negative) is added
to the 10-bit ADC value before scaling.  This is useful,
for example, for removing the effect of a non-zero offset
voltage of the ADC.  You must make the pin an input before
calling this routine.  The conversion is performed using
the AVcc reference voltage.


Resource Usage

The ZX processors contain a single analog-to-digital
converter thus allowing only one conversion to be performed
at a time.  The conversion process takes approximately
220uS during which time the calling task will be awaiting
conversion completion.  Only analog port pins may be used
to perform an analog-to-digital conversion.


Paul Lamar
-- 
The Rotary Engine NewsLetter. Powered by Linux.
ACRE NL web site. http://www.rotaryeng.net
Youtube key word PaulLamar2
Copyright 1998-2010 All world wide rights reserved.