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-Thread: a07f3367d7,3025dd6d917b499c X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.180.84.234 with SMTP id c10mr3124714wiz.4.1350352648680; Mon, 15 Oct 2012 18:57:28 -0700 (PDT) MIME-Version: 1.0 Path: q11ni134324884wiw.1!nntp.google.com!feeder2.cambriumusenet.nl!feeder1.cambriumusenet.nl!94.232.116.12.MISMATCH!feed.xsnews.nl!border-2.ams.xsnews.nl!feeder3.cambriumusenet.nl!feed.tweaknews.nl!85.12.40.130.MISMATCH!xlned.com!feeder1.xlned.com!border2.nntp.ams.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!news.panservice.it!news.swapon.de!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Simon Clubley Newsgroups: comp.lang.ada Subject: Re: Ada, the best language with the not-so-best tool chain Date: Tue, 9 Oct 2012 12:04:29 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <38af7fb8-b0a4-4a31-87aa-b7b698cc89c3@googlegroups.com> <3ca0ffd0-1764-484b-8fab-17c0d2dd9463@googlegroups.com> <1f645050-cf4c-40bf-a797-9687b69e4a54@googlegroups.com> <18ats2960nsvm$.kfufsnul13aq$.dlg@40tude.net> <5072c9ae$0$6562$9b4e6d93@newsspool4.arcor-online.net> <4keoa6epdxt7.1nnwxy7v7ar90.dlg@40tude.net> <5072dc68$0$6554$9b4e6d93@newsspool4.arcor-online.net> <1f7cmfp1l65w1.1deog8cfxbs0u$.dlg@40tude.net> <5072e37a$0$6556$9b4e6d93@newsspool4.arcor-online.net> Injection-Date: Tue, 9 Oct 2012 12:04:29 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="e298f3c034f630fa7d024371528fc2e1"; logging-data="30996"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1892aCkTQCLKd38cZlwTEer6MieDhVQ1fI=" User-Agent: slrn/0.9.8.1 (VMS/Multinet) Cancel-Lock: sha1:eZRJdZmr07RiK4fjj8Xtgdx62M4= Date: 2012-10-09T12:04:29+00:00 List-Id: On 2012-10-09, Dmitry A. Kazakov wrote: > On Mon, 8 Oct 2012 20:16:12 +0000 (UTC), Simon Clubley wrote: >> would not be suitable if you have hard real >> time requirements (although there are various RT extensions which might >> be suitable in some circumstances). > > Huh, are you building bombs, guys? (:-)) Since you have asked the question, I will answer it. :-) I'm a atheist liberal who values peace highly, so no, there are no bombs involved. There are plenty of hobbyist projects, such as model aircraft, or robotics in general, which do have these timing constraints however. > For most physical processes 1ms, > even 10ms cycle is more than enough. Linux can easily deliver you 1ms > cycle. > > Furthermore, I didn't see the specifications of the GPIO, but I suspect > that the time it needs to multiplex (how many A/D converters it actually > has?) and to convert all inputs and outputs could be well over 10ms. > That GPIO figure is off by several orders of magnitude. In most GPIO operations, it's a pure binary digital operation. In this case, you get one bit set in a register per GPIO line. If the GPIO line is above a MCU specific voltage, it's a logic one. If it's below that voltage, it's a logic zero. The GPIO lines are grouped together in registers so that you can read a set of them at the same time as a atomic operation. If, OTOH, you need to know what the voltage on the line actually is, then you choose a GPIO line which can be reconfigured as a A/D converter input and run it through the MCU's ADC. Sample rates of several thousand per second are still commonly achievable in this case. In one project, which was in C on a pair of 8-bit AVRs, I built a pseudo full duplex communications module around a pair of low cost half duplex transceivers. The incoming Rx line from the transceivers was fed directly into a GPIO line, which I sampled at a rate of 9600 times per second (as a digital signal, not a A/D conversion). If I miss just one of those 9600Hz windows, then the incoming packet is corrupted and therefore useless. As part of another project, I use a AVR to directly control R/C servos with their control lines connected to GPIO lines configured for output. The length of the pulse sent to a servo controls it's position, which is about 1ms for one position and 2ms for the position about 90 degress away. The centre point is about 1.5ms. Unless you can generate pulses with a accuracy of _well_ under 0.1ms at a rate of about 50Hz, you will see major jitter. You can control the pulse length on a AVR GPIO line to this degree of accuracy. I don't usually attempt this level of control on a ARM board directly however, as in these types of projects I would normally use a ARM board for higher level decision making and let it pass off commands to smaller dedicated 8-bit boards. I do RT work on ARM boards, but it's in the greater than several milliseconds range. > And who is talking about performance while choosing an ARM? > It's the difference between latency and raw performance. Simon. -- Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP Microsoft: Bringing you 1980s technology to a 21st century world