HWS Robot Festival - HWS Department of Mathematics and

Download Report

Transcript HWS Robot Festival - HWS Department of Mathematics and

Where Are We Going?
CPSC 120
Principles of Computer Science
September 23, 2012
Course Themes
 Complexity
and Structure
 Encoding and Decoding
 Hardware and Software
 Theory and Application
 Local and Remote
 Humans and Machines
Coming Attractions








Basic Electricity Theory
Switches, lights, and LEDs
Logic of switches: AND, OR, NOT, etc
Computing using logic: Adders
Arithmetic/logic units: ALUs
Central processing units: CPUs
Microprocessors: Real devices
A general view of a computer
When Hardware Meets Software:
A Robot Odyssey
 Programs
are coded instructions
 Programming in PBASIC
 Meet the Basic Stamp II Microprocessor
 BOE: Building a mobile robot
 Motors and sensors: hardware control
 Robot programming: Meet the real world
 Robot Exhibition: line following, obstacles
A Bit Further Down the Road
 Looking
at the bigger picture of computing
 Internet: coding/decoding all the way down
 Publish yourself on the web: HTML
 Getting stylish, getting more control
 Programming once again: Javascript
 Video editing: Looks easy? Try it and see.
 Video Exhibition: Show off your stuff
Another Approach: Computing seen from
very large to very small
 How
about understanding computing by
starting with the big picture? About people!
 The largest tangible computing
organization spans the entire world
 Let’s start there and narrow down in
search of the essentials to doing a
computation
 We will see this approach presents some
problems!
Earth at Night
Internet Connections
Computer Motherboard
A Computer Diagram
Microprocessor
Central Processing Unit (CPU)
Very Large Scale Integration
View of Chip Interior
Individual Transistors
We are almost at the very bottom of the
complexity tower!
Question : What do we know is fundamental
to (all) computers?
Answer: Electricity
So, to understand computers we should take
the plunge and learn something about
electricity.
Electricity and Computation
(Short Version)









Electricity is the flow of electrons
Positively (+) charged areas attract electrons (-)
Conductors (metal) allow electron flow
Insulators (ceramic, air) prevent electron flow
We can control electricity by switches
Switches create a logic of on/off control
Off/on, false/true, 0/1 encodes numbers also
Arithmetic can be done using true/false logic
We can encode hardware control using 0/1’s
Electricity and Circuits
A physical lamp circuit
Single Pole-Double Throw Switch
The corresponding schematic
An LED circuit using Power/GND symbols
Circuits All Around You
 How
do I design a seatbelt safety circuit
like the one in my car?
 How do I add a door ajar feature as well?
 How do I design a staircase lighting circuit
like the one in my two story house?
 What about my three story house?
 What about my twelve story building?
What comes next?
 Actually
handle some components in lab
and make some simple circuits: LEDs, etc
 Think about how to make some useful
circuits using simple switches
 Combine switches to create logic circuits
 Discover that logic and computation
overlap in just the right way using base 2
 Make a circuit that computes something!