comp.lang.ada
 help / color / mirror / Atom feed
From: Larry Hazel <lhhazel@otelco.net>
Subject: Re: New to Ada..need some help regarding Binary Conversion??
Date: Tue, 15 Oct 2002 13:53:20 -0500
Date: 2002-10-15T13:53:20-05:00	[thread overview]
Message-ID: <3DAC6420.30205@otelco.net> (raw)
In-Reply-To: 4ee1d187.0210150850.62ce918a@posting.google.com

Paula wrote:
> Hello all,
> 
> I am new to the Ada programming language and have worked through the
> wonderful material presented on Adapower.com and I have worked through
> the Lovelace tutorial.  I was doing prototyping using File IO and have
> worked through most of the problems there. My biggest challenge is now
> I must read in a "data signal" (which is in binary, in the form of
> 16-bit words, can be over more than one word, and isn't in a file),
> convert it to decimal and apply the correct scaling data to convert it
> to engineering units, and then do the reverse (take in engineering
> units, convert to raw bus data). I can do the scaling part...no
> problem..it's the reading in (I don't understand how to get the input
> if it's not in a file or from the keyboard). A coworker suggested
> creating a big table of 16-bit binary arrays, that I could declare a
> data-type as binary (??). Any help would be appreciated.
> 
> Thanks,
> 
> Paula

This sounds like analog to digital and digital to analog converters.  You have 
to have documentation for how to input/output to these devices.  Then (depending 
on the operating system) you need device drivers, representation clauses to map 
variables to device ports, or assembly level input/output instructions to talk 
to them.

Larry




      parent reply	other threads:[~2002-10-15 18:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-15 16:50 New to Ada..need some help regarding Binary Conversion?? Paula
2002-10-15 17:23 ` Colin Paul Gloster
2002-10-16 11:06   ` Paula
2002-10-16 12:27     ` Marin David Condic
2002-10-15 17:48 ` sk
2002-10-16 11:09   ` Paula
2002-10-15 18:36 ` Jeffrey Carter
2002-10-15 18:53 ` Larry Hazel [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox