3 ms·
> C feels "close to the metal" but at this point it's actually virtual metal. Since you mention the Arduino, when you start out with it, you're most likely tur
by klingonopera 7y ago
> C feels "close to the metal" but at this point it's actually virtual metal.
Since you mention the Arduino, when you start out with it, you're most likely turning on digital pin e.g. D7 with digitalWrite(7, true), it's easy to understand and quick to implement.
But spend enough time on the Arduino (or C or Assembly or embedded in general) and you'll soon realize that all that function call is doing is basically the same as doing PORTD |= 0x80. That's a bit tougher to understand, but even quicker to implement, and once you've understood how that all works together, a lot of everything about computers and digital electronics becomes so much easier to understand.
Here's a more detailed guide for the Arduino example: https://www.instructables.com/id/Fast-digitalRead-digitalWrite-for-Arduino/ https://www.instructables.com/id/Fast-digitalRead-digitalWri...