Lavabomb

Member Since: October 29, 2014

Country: United States

  • When you got down to 3 and 4 clocks per loop, were you using "|=" or "&=" operators?

    I would assume raw registers (ports) are declared as volatile for the compiler. The volatile keyword would force a read-modify-write for "|=" and "&=" operations. A read-modify-write would take 3 clock cycles each plus 1 for a jump which is consistent with your observation. Looking at the disassembly would also confirm if a read-modify-write is occuring.

    Changing to a direct assignment "=" could eliminate the read and modify leaving only a "write-write-jump" loop, 3 clocks. If so, that would be as good as assembly could get while still living at the high level C :). Super blinky.

  • I think formal academia education still talks about "functions", "recursion", "Turing Machines", etc. but I don't find a whole lot of those types of education articles in the Maker space. Would these topics be useful or are they overkill for what Makers want to know?

  • As an embedded software engineer by trade, I am disheartened by your experience. I feel compelled to chime in with some encouragement.

    I have found StackOverflow.com to be a quick, flame resistant, and typically top Google hit for most of my coding questions, especially for unusual Git situations (I use git command line and make mistakes). When questions are well written, the community is pretty good about suggesting solutions within the constructs of a specific language or development environment. They even actively discourage open ended opinion questions like "Which single board computer is best for my project?".

    I'd also throw out that there is a significant "science" to coding, Computer Science. Perhaps one route to overcoming flame wars is to focus conversations on objective mathematical principles. As an "Ohm's law" like example, the "Big O" of an algorithm is constant regardless of the programming language.

  • Constants like EEPROM_ADDRESS are also good candidates to become input parameters. In this case, making the address an initializer/constructor parameter would allow you to support multiple memory chips on the same IIC bus.

  • Maker Nightmare #28: Inadvertently achieving AI singularity.

No public wish lists :(