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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Interfacing Ada With Full Runtime Directly to Electronic Chips Date: Mon, 2 Jan 2017 10:14:37 +0100 Organization: Aioe.org NNTP Server Message-ID: References: <9ca07b79-db85-4d4a-b082-61cd75fcc1c8@googlegroups.com> NNTP-Posting-Host: s3c6wwRqkurrfTZpuYYZ+w.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:32991 Date: 2017-01-02T10:14:37+01:00 List-Id: On 2017-01-02 03:42, patrick@spellingbeewinnars.org wrote: > If I want to connect any sort of computer running Linux directly to > a circuit using "full Ada" with tasking support what are my options? > By circuit, I mean a variety of electronic components and in this > case with no microcontroller, an A/D chip is a simple example. I don't understand what you mean. Modern peripherals do not use dual-ported RAM, the only way you could have it connected without some sort of microcontroller. > I am thinking that single board computers like BeagleBone are my > best bet, they have plenty of GPIO lines. > > Has anyone interfaced directly with chips via SPI or IC2 via a GPIO > PCI card or GPIO-USB adapter ? We access GPIO digital and analogue converters using Linux driver. Ada.Text_IO is basically all what is needed. Well, that's Linux. AFAIK, no decent Linux driver (with interrupts, IOCTL, asynchronous I/O) is available. But BB's AD/DA is garbage anyway. You could not use it without additional hardware which would in the end turn more expensive than other options. > Is there any other options? For quality I/O we are using EtherCAT and ModBus I/O terminals. EtherCAT is very fast but extremely complicated. Don't believe people saying they have full EtherCAT stack implementations. That would be no more than a third of what is really needed to talk to complex terminals. I have implemented EtherCAT master myself. ModBus is simple, the stack is free. Terminals are a bit sluggish. With the internal cycle of 3ms you cannot poll them faster than at 5ms. And if you have many of them it promptly becomes hundreds of milliseconds. For both you will need tasking, of course. There is 1-wire and OWFS. I didn't evaluate this option in depth but from the S/W design point of view it looks no better than GPIO text I/O. And it is not much cheaper than I/O terminals. I would never use a USB adapter because of the nature of USB communication. PCI card is out question for a BB. Happy New Year! -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de