edited the first two paragraphs

This commit is contained in:
Alexander Sisco 2025-02-11 15:07:51 -08:00
parent 465536baf0
commit 6fbf81d929

View File

@ -3,22 +3,23 @@
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// //
// Another exciting thing about Zig is its suitability for embedded // Another exciting thing about Zig is its suitability for embedded
// programming. Your Zig code doesn't have to remain on your laptop. You can // programming. Your Zig code doesn't have to remain on your laptop; you can
// also deploy your code to microcontrollers! This means you can write Zig to // also deploy your code to microcontrollers! This means you can write Zig to
// drive your next robot or greenhouse climate control system! Ready to enter // drive your next robot or greenhouse climate control system! Ready to enter
// the exciting world of embedded programming? This quiz is designed to test // the exciting world of embedded programming? Let's get started!
// your knowledge of bit manipulationh in Zig while also giving you a taste of //
// what it's like to control registers in a microcontroller. Let's get started! // ----------------------------------------------------------------------------
// Some Background
// ----------------------------------------------------------------------------
// //
// A common activity in microcontroller programming is setting and clearing // A common activity in microcontroller programming is setting and clearing
// bits on input and output pins. This lets you control LEDs, sensors, motors // bits on input and output pins. This lets you control LEDs, sensors, motors
// and more! In a previous exercise (097_bit_manipulation.zig) you learned how // and more! In a previous exercise (097_bit_manipulation.zig) you learned how
// to swap two bytes using the ^ (XOR - exclusive or) operator. In this // to swap two bytes using the ^ (XOR - exclusive or) operator. This quiz will
// quiz, we'll take a closer look at bit manipulation and how we can write // test your knowledge of bit manipulationh in Zig while giving you a taste of
// code that sets and clears specific bits as we would if we were programming // what it's like to control registers in a real microcontroller. Included at
// the pins on a real microcontroller. Included at the end of this exercise are // the end are some helper functions that demonstrate how we might make our
// some helper functions that demonstrate how we might make our code a little // code a little more readable.
// more readable.
// //
// Below is a pinout diagram for the famous ATmega328 AVR microcontroller used // Below is a pinout diagram for the famous ATmega328 AVR microcontroller used
// as the primary microchip on popular microcontroller platforms like the // as the primary microchip on popular microcontroller platforms like the