Unformatted text preview: January 15, 2008 Embedded Control: Section 1
Instructor: Russell Kraft Instructor: Russell Kraft
The following are available on LMS: 1) Number Systems Worksheet 1 Number 2) Homework 1 3) SiLabs/SDCC Installation SiLabs/SDCC 4) Syllabus Syllabus
8/26/2010 Lecture #1 2 Outline
Introduction to Embedded Control course Staff Policies Lab partners & Lab Manuals Embedded Control Microprocessors and Microcontrollers What are they? How are they different? The Embedded Control Development Process Number Number Systems Homework Assignment
8/26/2010 Lecture #1 3 Staff
Professor: Russell Kraft (Course Coordinator) Email: [email protected] (use plain text message format) [email protected] Office: JEC 6028 Phone: x2765 TAs: Administrative TA: Alexey Gutin: [email protected] TA: Gutin: Manual
Embedded Control Manual – Available in class
You will purchase the manual from us.
It costs It costs $20 The manual has been updated for this Current semester Only cash or check (made out to RPI) accepted The manual is needed for quizzes and exams and can’t be shared, so you absolutely need to purchase a copy. The manual includes instructions for setting up the software and hardware, and course policies If you aren’t registered for this course: Do so! If you can’t do it today, email Dr. Russell Kraft ([email protected]) ([email protected]) and you will be added to the Blackboard Learning Management System (LMS)
Lecture #1 4 8/26/2010 8/26/2010 8/26/2010 Lecture #1 5 1 January 15, 2008 Policies
Course policies: Appendix D of Embedded Control Manual Roles of the Staff
Think of us as facilitators! RPILMS – Course Material – presently may contain some material from last semester (updated as term progresses) There are 2 exams. There are 5 quizzes and all count. count. Some homework assignments will be individual efforts on LMS. LMS. Some are joint assignments. It is part of your lab performance grade (along with preparation and part participation). ti Grades - RPILMS - Syllabus We can give you the material, but you need to learn it Please ask questions Try to resolve issues with them first If the problem can not be easily resolved, come to me or another instructor This is a busy class Check tutorials while you are waiting for help TAs are responsible for most of the grading Attendance is required for all laboratories required TAs and I are here to help you No food or drink allowed in the lab! You need to choose a lab partner for the entire semester think carefully about your choice...
Lecture #1 6 8/26/2010 Lecture #1 7 8/26/2010 Grading
We bring as much good will to grading as possible Be careful when assessing your standing in the course Grading
To distinguish yourself:
you need to understand the material so that you can do well on you need to understand the material so that you can do well on the the exams lab report grades are often high exams and quizzes hold more weight You must demonstrate your understanding to the instructor and/or the TA good lab performance grade hard work alone will not guarantee a high grade work alone will not guarantee high grade you need to thoroughly understand the course material Laboratory grades (excluding exams) are normalized at the end of the semester to account for differences in the end of the semester to account for differences in grading grading by TAs. Grades are not intended to be punitive 8/26/2010 Lecture #1 8 8/26/2010 Lecture #1 9 2 January 15, 2008 Information from the Web
Course uses RPILMS (WebCT) site as primary web contact. contact. Homework
Homework is posted on WebCT Check Check the website regularly Parts of the Lab Manual Announcements Course information Grades Tutorials Sample code Syllabus Calendar & Schedules Handouts Lecture slides (archive) (archive) Homework assignments Worksheets For homework assignments Lecture slides (after lecture) (last semester’s slides are up now.) now.) Due dates for your section Will not be accepted late not It is your responsibility to know what is due when HW is due at the beginning of class
- hard copy - soft copy submission on RPILMS (WebCT) (WebCT) Homeworks: Homeworks: But there also is a general web site http://litec.rpi.edu http://litec.rpi.edu
8/26/2010 Lecture #1 10 One homework per pair for most assignments. Some will be clearly stated assignments. as individual efforts. efforts. Put both names on HW if you both deserve credit 8/26/2010 Lecture #1 11 You’ll generally do well if...
Show up on-time for lecture onRead the lab manual Finish lab work during class lab work during class Current Project
Introduction to embedded control: Interactive game (Simon, Guitar Hero, Whack a Mole, …): …) Goals: To learn LITEC basics Build hardware to interface with microcontroller Write software to make game work Final projects: Smart Car and Blimp: Implement test hardware on car for code development Software Control car (blimp) direction after obtaining the magnetic heading Control car speed (blimp elevation) based on ultrasonic ranger Port car code to gondola of blimp
12 8/26/2010 Lecture #1 13 Use open shop hours when needed Do your own work and turn it in on-time onRefer to and use the tools available to you Take turns writing code and wiring hardware Take turns writing code and wiring hardware Take turns writing code and wiring hardware Take turns writing code and wiring hardware turns writing code and wiring hardware Ask for help and use the tutorials 8/26/2010 Lecture #1 3 January 15, 2008 Early Version of Smart Car
Intelligent Faucet First Target System
• Simple Game • Faucet subsystems Integration • System Integration • Enhancements 8/26/2010 Lecture #1 14 8/26/2010 Lecture #1 15 The Smart Car Smart Car Enhancements 8/26/2010 Lecture #1 16 January 15, 8/26/2010 2008 Lecture #1 17 4 January 15, 2008 FLITEC Flight Laboratory Introduction To Embedded Control Silicon Labs IDE Software
Follow the instructions on LMS “Installing SiLabs-SDCC-Drivers” for SiLabs-SDCCinstalling all the software needed for the course You will need to install Silicon Laboratories IDE software on your laptop for this course It is not required to install all documentation Install software into the default folder named Silicon Laboratories Create folders for projects May be inside a new C:\SiLabs folder C:\ No spaces in entire path name (i.e., not in “Program Files”) Save code files in this project folder with a .c extension No spaces or special characters (except ‘-’ and ‘_’) and only one “.” in file names ‘A ‘#’ symbol in the file name may cause some very unexpected results 8/26/2010 Lecture #1 18 8/26/2010 Lecture #1 19 Silicon Labs IDE Software
Obtain the header file c8051_SDCC.h from LMS Obtain drivers for the USB-to-Serial connector USB-toDetermine the COM port connected at the USB th COM th USB Open SecureCRT. SecureCRT. Install SecureCRT Create a new session Change the Protocol to "serial", and the name to "C8051" Open the “Control Panel” Open Device Manager Open "System" from Control Panel Click "Hardware" tab. Click "Device Manager" 7) Click the plus sign next to "Ports (COM & LPT) Check the COM port number for Prolific USB--to--Serial Comm Port. USB to Determine the COM port connected at the USB
Install SecureCRT, next slide (Putty and HyperTerm are alternatives) SecureCRT, Change Change the port number to the COM port number Uncheck all boxes under "Flow Control". all Set Set Baud rate to 38400, Data bits to 8, Parity to None, Stop bits to 1. These should be the default settings, but you never know. should Under Category (on the left) click Emulation Under Category (on the left) click "Emulation". Under Scrollback, change the value in Scrollback buffer to 3000. Scrollback, 3000. Click Click OK. Click "Connect". 8/26/2010 8/26/2010 Lecture #1 20 8/26/2010 Lecture #1 21 5 January 15, 2008 Find a partner
Find a partner and change places TA will come around with attendance sheet will come around with attendance sheet Install SiLabs software on your laptop Syllabus: Manual Appendix D (RPILMS)
Staff & info Objectives Required texts Grading – see RPILMS site – Syllabus Instructions: Course Materials at http://litec.rpi.edu We have limited CDs If not done today, come by during open shop time • note percentages lab performance 20% per day late policy on lab reports No late homework (late if 10 minutes after start of class) class) One laptop per pair is all that is necessary, but set up both machines. Make sure backups of all files are saved Maintain working copies of the code for each laboratory assignment (once a program is completed, leave it untouched and create a new project folder for the next program; copy any files to it from the previous folder) See you in 20 minutes… Look at RPILMS site at RPILMS site Look at HW #1 Buy Lab Manual
8/26/2010 Computers – use your laptop • Sign up for your section under Sections Sections Lecture #1 22 8/26/2010 Lecture #1 23 Lab Notebooks
Your pair is required to keep a lab notebook (Later in the semester 2 pairs will form a team, for now you’re in pairs.) semester pairs will form team, for now you in pairs. One per pair Use one with large pages (8.5”x11” or larger) larger) Quad-ruled notebook with non-removable pages QuadnonAppendix B: Notebook guidelines & requirements (RPILMS) (RPILMS) No 3-ring or spiral binders 3Do not lose your notebook Academic Dishonesty
I need to remind you that the work that you do for this class must be your own (or your pair’s or team’s as appropriate). Academic Dishonesty is a serious issue that could have severe consequences. The penalty for instances of academic dishonesty can vary, but includes failing the course and being reported to the Dean of Student’s Office who will keep the report on your record and may result in expulsion from the institute. Note: The institute will not allow you to drop a course in which there is an academic dishonesty dispute. Examples of academic dishonesty include (but are not limited to) copying from another student on an exam or quiz, copying portions of written assignments (homework assignments, lab reports, lab notebooks) from another previous or current student, and having someone else do class another previous or current student, and having someone else do class work work for you and turning it in for credit for you. If you use materials (text, graphs, images, etc) that are not of your own creation, it should be referenced using standard formatting procedures. Avoid long quotations from other materials, and reproduce schematics so they represent your own circuit as changes may occur. Best advice: If you think something is questionable, then don’t do it.
8/26/2010 Lecture #1 24 8/26/2010 Lecture #1 25 6 January 15, 2008 What is Embedded Control?
System with a “built-in” computer “builtUsed in all engineering/science disciplines in all engineering/science disciplines Time - Man of the Year article http://cgi.pathfinder.com/time/moy/daily1.html Bill Gates has predicted that robotics will be the next big http://www.sciam.com/sciammag/?contents=2007thing. http://www.sciam.com/sciammag/?contents=2007-01 Microprocessor
A computer processor
on a microchip microchip that contains units that handle and process computer instructions Microcontroller: and input and output signals Father of the Microprocessor (earned his BEE at RPI) RPI) Developed architecture for single-chip CPU at Intel (1968) architecture for single CPU at Intel (1968 Marcian “Ted” Hoff, ’58 These robots won’t look like R2D2 or C-3PO. Most will contain C-3PO. multiple microcontrollers. 8/26/2010 8/26/2010 Lecture #1 26 8/26/2010 Lecture #1 27 Microcontrollers
Lots of peripherals integrated in communication I/O (including A/D) A/D) timers counters Microcontrollers ((C8051F020 manual pg. 18) C8051F020 Low end arithmetic capabilities Low end memory bus interfaces Low cost cost A microcontroller is a microprocessor with a lot of stuff integrated into the package We will use a SiLabs 8051F020 microcontroller
Lecture #1 28 8/26/2010 Lecture #1 29 8/26/2010 7 January 15, 2008 The Development Process
Software Hardware Specification Development Selection of Processor Hardware Design of Target System Pseudo Code Actual Code Compile Download Test on Evaluation Board on Evaluation Board Prototype Target System Port to Target System Test Combined System Document
8/26/2010 Lecture #1 30 C Essentials – WebCT
This course requires programming in C
“LITEC C” Any existing programming background should be OK The manual provides details regarding the specific programming features introduced in this course Relevant to this course Use the reference chapters for help with programming structure, syntax, etc. This material is fair game for quiz/exam may also provide help on more complicated issues LITEC C does not use pointers (you can, if you want to) to)
Lecture #1 31 C programming texts: 8/26/2010 Number Systems
We will begin the topic of programming skills by introducing Number Systems introducing Number Systems Number Systems we use in LITEC: Number Systems
Why use different number systems?
A number to us: 123 This same number to a computer: 01111011 Need to convert values between these systems
Most Significant Bit
0 1 1 1 1 0 decimal (base 10) 10) binary (base 2) 2) hexadecimal (base 16) 16) Should be a review of mathematical concepts Least Significant Bit
1 1 8/26/2010 Lecture #1 32 8/26/2010 Most Significant Nibble Lecture #1 Least Significant Nibble 33 8 January 15, 2008 Converting: Binary to Decimal Converting: Decimal to Binary
123 ÷2 61 rem 1 ÷2 30 rem 1 ÷2 15 rem 0 ÷2 7 rem 1 ÷2 3 rem 1 ÷2 1 rem 1 ÷2 0 rem 1
34 8/26/2010 0 1 1 1 1 0 1 1 128 27 0 64 26 1 32 25 1 16 24 1 8 23 1 4 22 0 2 21 1 1 20 1 0(128) + 1(64) + 1(32) +1(16) + 1(8) + 0(4) + 1(2) + 1(1) = 123 When the answer is ‘0’, fill the rest of the byte with leading zeros
8/26/2010 Lecture #1 Lecture #1 35 Hexadecimal (“hex”)
Hexadecimal is more convenient than binary Conversion between decimal and hexadecimal: similar to binary: use powers of 16 instead of 2 Converting: Decimal & Hexadecimal Need 16 different digits Hexadecimal digits run 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
Example: 123 ÷ 16 7 rem 11 (use B) ÷ 16 0 rem 7 rem 0x7B 123 in hex is 0x7B (the “0x” is used to indicate hex) (the hex) 0x7B = 7(161) + 11(160) = 112 + 11 = 123
8/26/2010 Lecture #1 36 8/26/2010 Lecture #1 37 9 January 15, 2008 Converting: Binary to Hexadecimal Conversion Table
Binary 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111
38 8/26/2010 8/26/2010 Most Significant Bit Least Significant Bit 0 1 1 1 1 0 1 1 7 01111011 = 0x7B
8/26/2010 Lecture #1 B Decimal 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Lecture #1 Hex 0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xA 0xB 0xC 0xD 0xE 0xF
39 Number Number System Worksheet
Use worksheet Homework
Homework #1 Due at beginning of next class at beginning of next class To test your knowledge of number systems test kno of Practice converting between systems Save the worksheet and put it in your lab notebook when you get one. Available from course website from course website Read it printed and electronic copy first 10 minutes Use SiLabs editor to type in example program Read chapter 2 of the lab manual (RPILMS) (RPILMS) If you use a word processor – save as text only.
Lecture #1 41 Number System Essentials handout Assignment: Answers will be given at beginning of next class
8/26/2010 Lecture #1 40 8/26/2010 10 January 15, 2008 Remaining Time for Homework
Use your laptop Load SiLabs program if you have not done so Installation instructions in the handout instructions in the handout http://litec.rpi.edu under Course Materials http://litec.rpi.edu Run IDE program or any other text editor to type in code Beware of “gremlins” !!! To connect, you will also need to download drivers for the serial to USB adapter. http://www http://www.prolific.com.tw/eng/downloads.asp?ID=31 Vista users: just connect the adapter to your computer, the found new hardware window will found appear. appear. Allow it to search the web. It might take 10 web. seconds or 5 minutes, but it will find the driver.
8/26/2010 Lecture #1 42 11 ...
View Full Document
- Spring '08
- Binary numeral system, Numeral system, RPILMS