240 likes | 329 Views
Announcements . Feb 14 - ESPN will be recruiting via video conference. A typical “hardware” standard. How do computers control the world?. Each joint is a motor that can be turned on and off with a switch. 7 switches to control a whole robot. A Computer “port”.
E N D
Announcements • Feb 14 - ESPN will be recruiting via video conference
Each joint is a motor that can be turned on and off with a switch
A Computer “port” • Connects 1 byte of memory to outside world
A printer “Port” • Computer connects an internal byte variable to the printer switches, and changes the values to tell the printer what to print
Address Data Memory r/w
I/0 Memory Data Memory Program Memory Fast Specialty Memory
Memory mapped I/O 8-bit Your Program Driver Port A Decimal Variable A Binary Value A function call
an example program Private Sub Write_Port(value As Integer) txtByteOut.Text = (value) 'decimal Status = cbUSBDOut(DeviceNum, RELAY_PORT, value) If value < 16 Then txtHexOut.Text = "0" & (Hex(value)) Else txtHexOut.Text = (Hex(value)) End If ' hex txtBinary.Text = CBin(value) 'binary End Sub
Computer “dirty” Environment
Computer Environment
buying parts http://www.sparkfun.com