Presentation is loading. Please wait.

Presentation is loading. Please wait.

CMPE 118 MECHATRONICS CMPE 118/L Introduction to Mechatronics Tu-Th 4:00-5:45pm, Jack Baskin Engineering 372 Lab: Jack Baskin Engineering 150, 24/7 Instructor:

Similar presentations


Presentation on theme: "CMPE 118 MECHATRONICS CMPE 118/L Introduction to Mechatronics Tu-Th 4:00-5:45pm, Jack Baskin Engineering 372 Lab: Jack Baskin Engineering 150, 24/7 Instructor:"— Presentation transcript:

1 CMPE 118 MECHATRONICS CMPE 118/L Introduction to Mechatronics Tu-Th 4:00-5:45pm, Jack Baskin Engineering 372 Lab: Jack Baskin Engineering 150, 24/7 Instructor: Prof. Gabriel Hugh Elkaim TAs: Rob Kelbley, Eric Decker

2 CMPE 118 MECHATRONICS Why “Smart Products?” Focuses on Microcomputers as Components, not Controllers Encompasses Mechatronics, & Embedded Systems Design

3 CMPE 118 MECHATRONICS What Makes Mechatronics Different? Intelligent Decision Making The Ability to Adapt Cost Effectiveness

4 CMPE 118 MECHATRONICS What Makes the Decisions? Computers

5 CMPE 118 MECHATRONICS Where have you encountered Smart Products ?

6 CMPE 118 MECHATRONICS Number Representations Binary:10101010 Hexadecimal:$AA Converting: 1010 $A A

7 CMPE 118 MECHATRONICS Number Terminology 1010 Byte Integer Word MSB LSB Upper Nibble Lower Nibble

8 CMPE 118 MECHATRONICS Modulo Arithmetic 11111111 +1 00000000 11111111

9 CMPE 118 MECHATRONICS Modulo Arithmetic 11111111 +1 00000000 11111111 Watch out for intermediate results too: How do you fix it? Cast variables up to next higher size Cast result back down

10 CMPE 118 MECHATRONICS Bit Manipulation How do you Set, Clear or Test individual bits?

11 CMPE 118 MECHATRONICS Bit Manipulation How do you Set, Clear or Test individual bits? The Bitwise Operators Bitwise AND = & Bitwise OR = | 0001 0000 Result is 0 or not 0 1011 1010 Result same except for bit position 0010 1010 Result same except for bit position To Test a bit 0011 1010 To Clear a bit 0011 1010 To Set a bit 0011 1010 0001 0000 AND mask, tests a single bit (VAR & IMASK) 1000 0000 OR mask, sets a single bit (VAR | SMASK) 1110 1111 AND mask, clears a single bit (VAR & CMASK)

12 CMPE 118 MECHATRONICS What is a: Microprocessor? Micro-computer? Microcontroller?

13 CMPE 118 MECHATRONICS Micro-Computer Components CPU Program Memory Scratchpad Memory Input/Output (I/O)

14 CMPE 118 MECHATRONICS CPU MemoryI/O Address Bus Data Bus

15 CMPE 118 MECHATRONICS Address Space

16 CMPE 118 MECHATRONICS What’s in the Address Space? InstructionsInstructions to the Microprocessor. Often referred to as “Machine Language” DataGenerally we put this there during the operation of our programs ControlThese occupy space like memory, but are actually Registersspecial locations that interact directly with the hardware of the microprocessor. PortsA subset of the control registers. Ports generally offer direct control of the pins on the microprocessor.

17 CMPE 118 MECHATRONICS Memory Map

18 CMPE 118 MECHATRONICS Program Memory Options MROM PROM EPROM Erasable OTP EEPROM (E 2 PROM) FLASH EPROM

19 CMPE 118 MECHATRONICS Scratchpad Memory Options Static RAM Battery-Backed Dynamic RAM Cache RAM

20 CMPE 118 MECHATRONICS What Features Will You Find? Parallel I/O Programmable Fixed Direction

21 CMPE 118 MECHATRONICS What Features Will You Find? Counters Timers Simple Complex Outrageously Complex

22 CMPE 118 MECHATRONICS What Features Will You Find? A/D Converters 8-bit 10-bit Multi-channel

23 CMPE 118 MECHATRONICS What Features Will You Find? D/A Converters PWM True DACs

24 CMPE 118 MECHATRONICS What Differentiates Micro- Controllers? Feature Sets Architecture Physical Size Cost

25 CMPE 118 MECHATRONICS The Freescale 68HC12 (was Motorola) Hi-Performance 16-bit Controller 16-bit Data Bus Supports Hi-Level Languages Comes in over 45 “Flavors”

26 CMPE 118 MECHATRONICS

27 68HC12 Memory 16-bit Address Bus 64K (65536) Byte Address Space 16-bit Data Bus 2K (2048) Bytes RAM 32K Bytes FLASH ROM

28 CMPE 118 MECHATRONICS 68HC12 Parallel I/O 24 Bi-Directional Lines 8 are multiplexed analog input

29 CMPE 118 MECHATRONICS 68HC12 Timer System 16-bit Free-Running Counter Input Captures (8) Output Compares (8)

30 CMPE 118 MECHATRONICS 68HC12 A/D Converter 10-bit (1:1024) Resolution 8 Channels –2 banks of 4 inputs

31 CMPE 118 MECHATRONICS 68HC12 Pulse Accumulator 8/16 Bits Interrupt on Overflow

32 CMPE 118 MECHATRONICS 68HC12 Serial I/O SPI (synchronous) SCI (asynchronous)

33 CMPE 118 MECHATRONICS The Development Process foo 68HC12 Serial Cable (RS232) PC NanoCoreDX

34 CMPE 118 MECHATRONICS Questions?


Download ppt "CMPE 118 MECHATRONICS CMPE 118/L Introduction to Mechatronics Tu-Th 4:00-5:45pm, Jack Baskin Engineering 372 Lab: Jack Baskin Engineering 150, 24/7 Instructor:"

Similar presentations


Ads by Google