Author Topic: Programming = Magic  (Read 882 times)

0 Members and 1 Guest are viewing this topic.

Offline XyverTopic starter

  • Robot Overlord
  • ****
  • Posts: 125
  • Helpful? 0
Programming = Magic
« on: May 16, 2012, 04:05:30 PM »
Anyone else feel this way?  It is one thing I can never wrap my head around.  We type things into a keyboard, it is converted into electrical signals, sent down the wire to the processor, and then somehow the processor reads and stores those signals to make the robot (or any device) act as we please.

Programming, HOW DO YOU WORK?!?!

Offline newInRobotics

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: Programming = Magic
« Reply #1 on: May 17, 2012, 03:06:44 AM »
Nothing human created is magic  ;D Humans are not capable of magic, if they were, there would be no need for microcontrollers  ;D

Don't know for sure, but I guess the following:
We know that microcontrollers consist of many many transistors. I assume that 1 bit (of a byte) is a physical device somehow similar to flip-flop (after applying 5V it stays ON, after applying 5V again it switches OFF). So, when microcontroller is in Programming Mode, data stream sent from PC sets these "flip-flops" in a place called Program Memory in microcontroller. When microcontroller gets powered on, and works in it's normal mode, it starts reading Program Memory at location 0x0 iterates through each bit (of a byte) to the next location 0x1, etc, etc... different combinations of these bits achieve different results, and that's what we need  :)

I might be wrong, but that's how I imagine it works. Anyone else having more knowledge on the subject?
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline XyverTopic starter

  • Robot Overlord
  • ****
  • Posts: 125
  • Helpful? 0
Re: Programming = Magic
« Reply #2 on: May 22, 2012, 10:04:54 PM »
It just blows my mind how something physical (keyboard strokes) can be converted into something electronic, sent through the wires, converted back into something physical (the memory in the microprocessor), then read and turned back in to electricity, then finally back into something physical as the program runs.

AND, it is rewritable.  It's not like it burns the memory of the program into the microprocessor, it is just there and can be undone and rewritten.

I'm pretty sure it's magic.

Offline HyperCube

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
Re: Programming = Magic
« Reply #3 on: May 24, 2012, 12:57:12 PM »
Yep, magic.

 


Get Your Ad Here