NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Microcontroller Programming » MCU basic concept

September 09, 2015
by jchen
jchen's Avatar

I enjoyed the Nerdkit NK003USB. I often find technical explanations by technical professions tend to focus too much on the details of details and often forget to frame the topic at a higher level. For example, after reading the Nerdkit NK003USB, MCU (or computer in that matter) is nothing but a bunch of storage (registers) with pins to input or output high (1 or +5V) or low (0 or 0V). How you define those bits in the register and when you read them or change them via pins is up to you. The rest is just detail instructions (or syntax) on how to read/store bits. We went through a lot of years in college to learn these 'syntax', but I think the overall concept is often missed. Engineers get really excited on the detail syntax. If you look into it, they are just syntax details and the concept is quite simple and does not change. Engineers love to change syntax, then rename and call it something new (just look at the programming languages we have today), but at the end of the day, it's just bit flipping :-)

September 09, 2015
by BobaMosfet
BobaMosfet's Avatar

An MCU is more than a 'bunch of registers' and pin assignments. That's an oversimplification that prevents people from understanding the difference between a CPU and an MCU.

A CPU is a brain without arms and legs built in. You have to add memory, and peripheral chips for various I/O support. An MCU on the other hand is a smaller brain (traditionally), but also includes all the other peripherals in the same chip, allowing it to function standalone, whereas a CPU is not standlone.

BM

September 09, 2015
by jchen
jchen's Avatar

This is great. Thanks for the input and it does make it easier to distinguish CPU and MCU.

September 09, 2015
by jchen
jchen's Avatar

I think to teach our kids on the fundamentals of computers or electronics, the fundamentals of '1' and '0' should really be more emphasized. Once we understand the '1' and '0' are nothing more than just representations of certain meaning as defined by a person, then the rest is easy. For example, if I see a person raising his hand, it would mean '1'. If I see the person lower his hand, then it means '0'. For each passing second, I'll check if the person's hand is raised or lowered then record the '1' and '0'. It could be every second or every minute that I check the person's hand. So the '1 second' or '1 minute' is the clock. Once I record the '1' and '0' as reflected by the person's hand being raised or lowered per second, then I can start define what these '1' and '0' mean. For example, I can say if I see consecutively four '1' then the person is hungry. So the four '1' has a meaning which is arbitrarily defined. I can also say if I see four consecutive '0' and followed by two '1', then the person is thirsty. Again, the interpretation of the sequence of '1' and '0' is arbitrarily defined, so as long as the two people (person raising/lower his hand and other person seeing) agree on the interpretation then they can communicate. Fiber optics is a real good example. When the light is on, then it's a '1'. When the light is off then it's a '0'. The light is flickering very fast, so at 1 billionth of a second, you check whether the light is on or off. And in 1 second, there are 1 billion '1' and '0' got transmitted. And how we wirelessly send over the '1' and '0' using air, or electrical pulse is really just the physics of how we use physical medium to represent '1' and '0'.

September 10, 2015
by BobaMosfet
BobaMosfet's Avatar

In computers, 1 and 0 represent the two states of a transistor output-- high or low. That's why binary is the basis in computers.

BM

September 10, 2015
by Ralphxyz
Ralphxyz's Avatar

I like jchen's simple concept and then of course BM's specifics!

Post a Reply

Please log in to post a reply.

Did you know that Pulse Width Modulation (PWM) can be used to control the speed of a motor digitally? Learn more...