comp.lang.ada
 help / color / mirror / Atom feed
From: Colin Paul Gloster <Colin_Paul_Gloster@ACM.org>
Subject: Re: New to Ada..need some help regarding Binary Conversion??
Date: Tue, 15 Oct 2002 18:23:45 +0100
Date: 2002-10-15T17:24:16+00:00	[thread overview]
Message-ID: <3DAC4F21.60B7A90D@ACM.org> (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"

Hello Paula.

Where exactly is the data signal coming from? You may need to write a
custom
device driver to get at the hardware, and maybe an interrupt service
routine too.
For example mouse drivers are interrupt driven. You may find it helpful
to read
about representation clauses, such as address clauses for interrupts.




  reply	other threads:[~2002-10-15 17:23 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 [this message]
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
replies disabled

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