One thing I noticed though was that adding network support seems tricky

Yes, indeed. Programming 8 bit AVRs (ATtiny, ATmega, ATxmega) is comparable to programming the old home computers, but in C (and perhaps some Assembler) instead of BASIC (and almost always Assembler). Your code runs on the bare hardware, there is no operating system, you have to implement everything by yourself (or find good libraries).

Networking can be easy, for some kind of networks. Many AVRs have hardware support for I²C (called two-wire interface), SPI, the "better" ones also have a hardware UART capable of implementing RS232 and RS485 (except for the line level inverters), the "big" ones also have a CAN bus controller.

But the UART lacks a FIFO that you are used to from "big" computers, so you need a fast interrupt routine to buffer incoming data and another one to send buffered outgoing data. This is also true for I²C, SPI, and probably even CAN. And due to the low clock frequency (typically much less than 50 MHz), your code runs slow compared to any PC you might use today, even with a highly optimizing compiler and a RISC instruction set. You simply won't be able to handle data coming in at Gigabit Ethernet speeds, no matter what interface you use. Probably not even at 10 MBit/s. And you don't have the memory to do so, not even enough address lines.

So, what does work?

Note that the really big AVRs contain USB controller hardware, so you don't need bit-banging to communicate with the USB host. But those AVRs come only in SMD packages.

AVRs are cheap. Consider using two AVRs, one for the real-time task and one for the communication with the outer world. Use I²C, SPI or similar for a simple, fast protocol in between those two AVRs. Or use I²C, SPI, or RS232 between an AVR and a raspi.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

In reply to Re^5: Device::BCM2835, hardware access on a pi, SIGSEGV by afoken
in thread Device::BCM2835, hardware access on a pi, SIGSEGV by Peterpion

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.