From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6439f56f895df143 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-10-15 11:52:27 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-out.nuthinbutnews.com!propagator2-sterling!news-in-sterling.newsfeed.com!news-in.nuthinbutnews.com!falcon.america.net!eagle.america.net.POSTED!not-for-mail Message-ID: <3DAC6420.30205@otelco.net> From: Larry Hazel User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 X-Accept-Language: en,x-ns11F8K63r3NhQ,x-ns2r2e09O MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: New to Ada..need some help regarding Binary Conversion?? References: <4ee1d187.0210150850.62ce918a@posting.google.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 15 Oct 2002 13:53:20 -0500 NNTP-Posting-Host: 66.0.32.230 X-Trace: eagle.america.net 1034708163 66.0.32.230 (Tue, 15 Oct 2002 14:56:03 EDT) NNTP-Posting-Date: Tue, 15 Oct 2002 14:56:03 EDT Organization: 24hoursupport.com Xref: archiver1.google.com comp.lang.ada:29815 Date: 2002-10-15T13:53:20-05:00 List-Id: 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