Presentation is loading. Please wait.

Presentation is loading. Please wait.

Robocon 2007, Hong Kong University of Science & Technology Robocon 2007 Electronics Quickstart! Session 1 Hello! Microcontroller. Prepared by KI Chi Keung.

Similar presentations


Presentation on theme: "Robocon 2007, Hong Kong University of Science & Technology Robocon 2007 Electronics Quickstart! Session 1 Hello! Microcontroller. Prepared by KI Chi Keung."— Presentation transcript:

1 Robocon 2007, Hong Kong University of Science & Technology Robocon 2007 Electronics Quickstart! Session 1 Hello! Microcontroller. Prepared by KI Chi Keung [chikeung @ ust.hk] WONG Long Sing (Sam) [sam @ hellosam.net]

2 Robocon 2007, HKUST Today ’ s Timeline 1.Game Introduction 2.Microcontroller 3.Training Board 4.Development Tools 5.LED, Buzzer and Button

3 Robocon 2007, HKUST Game Introduction Manual Machine Auto Machine

4 Robocon 2007, HKUST Game Introduction Output Device –RC Servo Motor –DC Motor –Valve Control –LCD Input Device –Joypad (Playstation Controller) –Button –Sensor

5 Robocon 2007, HKUST Microcontroller The brain of the machine. Why not PC? Efficiency –Space –Weight –Energy Direct Control –Discrete Logic –Timing

6 Robocon 2007, HKUST Microcontroller MCU is CPU + Memory (RAM) + Storage (Flash & EEPROM) + Handy hardware module for –Communication –Common but hard to code function like Timer

7 Robocon 2007, HKUST Microcontroller We mainly use ATMega128 (Model Number), which is a 8-bit AVR MCU (Architecture), By Atmel (Manufacturer) But then how to use? Read the specification!

8 Robocon 2007, HKUST Microcontroller Basic about CPU Run instructions in discrete time defined in the spec. Run sequentially, non-stop, 24x7…if working condition is met. It does not know about time. The ultimate time source is the Crystal Oscillator. (Basically apply to all IC)

9 Robocon 2007, HKUST Microcontroller Every CPU runs machine code Machine code can be generated from assembly code Assembly code can be generated from high level language We use C to code our MCU

10 Robocon 2007, HKUST Microcontroller Your program will be the only program running on the chip. There is no OS. No OS means there is no hardware driver. Which basically implies printf is not available. How debug is done?

11 Robocon 2007, HKUST Training Board IO and Peripherals MCU Power

12 Robocon 2007, HKUST Software Development Loading the first program. C Compiler Flashing a new program

13 Robocon 2007, HKUST LED, Buzzer and Button


Download ppt "Robocon 2007, Hong Kong University of Science & Technology Robocon 2007 Electronics Quickstart! Session 1 Hello! Microcontroller. Prepared by KI Chi Keung."

Similar presentations


Ads by Google