Embedded System Design - Chapter 6: Development tools

How to use
All projects will have these basic steps:
1. Create Project – Tạo dự án
2. Select Device – Chọn thiết bị
3. Select Language Tools – Chọn ngôn ngữ
4. Put Files in Project – Đặt file vào dự án
5. Create Code – Tạo mã chương trình
6. Build Project – Xây dựng dự án
7. Draw simulation schematic – Vẽ mạch mô phỏng
8. Test Code with Simulator – Kiểm tra mã với phần mềm mô phỏng 
pdf 16 trang thamphan 26/12/2022 2560
Bạn đang xem tài liệu "Embedded System Design - Chapter 6: Development tools", để tải tài liệu gốc về máy hãy click vào nút Download ở trên.

File đính kèm:

  • pdfembedded_system_design_chapter_6_development_tools.pdf

Nội dung text: Embedded System Design - Chapter 6: Development tools

  1. 8/9/2016 ĐẠI HỌC QUỐC GIA TP.HỒ CHÍ MINH TRƯỜNG ĐẠI HỌC BÁCH KHOA KHOA ĐIỆN-ĐIỆN TỬ BỘ MÔN KỸ THUẬT ĐIỆN TỬ Embedded System Design Chapter 6: Development tools 6.1 MPLab 6.2 Proteus Bộ Môn Kỹ Thuật ĐiệnTử - ĐHBK 1 References • Materials – Microchip, “MPLAB IDE User’s Guide”, Elsevier Newnes, 2009 • Websites – Bộ môn Kỹ Thuật ĐiệnTử - ĐHBK Chapter 6 2 1
  2. 8/9/2016 How to use All projects will have these basic steps: 1. Create Project – Tạodự án 2. Select Device – Chọnthiếtbị 3. Select Language Tools – Chọn ngôn ngữ 4. Put Files in Project – Đặt file vào dự án 5. Create Code – Tạomãchương trình 6. Build Project – Xây dựng dự án 7. Draw simulation schematic – Vẽ mạch mô phỏng 8. Test Code with Simulator – Kiểmtramãvớiphần mềmmôphỏng Bộ môn Kỹ Thuật ĐiệnTử - ĐHBK Chapter 6 5 Step 1. Create Project Bộ môn Kỹ Thuật ĐiệnTử - ĐHBK Chapter 6 6 3
  3. 8/9/2016 Name your project Bộ môn Kỹ Thuật ĐiệnTử - ĐHBK Chapter 6 9 Step 4. Put Files in Project Bộ môn Kỹ Thuật ĐiệnTử - ĐHBK Chapter 6 10 5
  4. 8/9/2016 Add to project • Once the file is saved you can add it to your project Bộ môn Kỹ Thuật ĐiệnTử - ĐHBK Chapter 6 13 Step 6. Build Project • Project>Build All Bộ môn Kỹ Thuật ĐiệnTử - ĐHBK Chapter 6 14 7
  5. 8/9/2016 Step 7. Draw simulation schematic • Open “Blinking_LED.dsn” in the Proteus VSM MPLAB Bộ môn Kỹ Thuật ĐiệnTử - ĐHBK Chapter 6 17 Step 8. Test Code with Simulator Simulator toolbar reset run animate step into step over routine step out of routine START SIMULATION Bộ môn Kỹ Thuật ĐiệnTử - ĐHBK Chapter 6 18 9
  6. 8/9/2016 Step 8. Test Code with Simulator • Select View > Watch Watch – select variable “count” Watch – reset values Bộ môn Kỹ Thuật ĐiệnTử - ĐHBK Chapter 6 21 2. Advanced simulation with Proteus • Proteus Virtual System Modelling (VSM) combines mixed mode SPICE circuit simulation, animated components and microprocessor models to facilitate co- simulation of complete microcontroller based designs. • It is possible to develop and test such designs before a physical prototype is constructed. • Available for PIC, 8051, MSP430, AVR, HC11, ARM7/LPC2000 and Basic Stamp processors • See your code interact with simulated hardware in real-time • Interactive peripheral models for displays, keypads, etc. • Over 8000 analogue and digital device models • Extensive single step and debugging facilities including system wide diagnostics. • Works with popular compilers and assemblers Bộ môn Kỹ Thuật ĐiệnTử - ĐHBK Chapter 6 22 11
  7. 8/9/2016 Step 3. Edit component • Double click to the component Bộ môn Kỹ Thuật ĐiệnTử - ĐHBK Chapter 6 25 Step 3. Edit component • Configure: – Program file (hex file can be created by MPASM, CCS C or Mikro C tools) – Clock frequency (MHz) Bộ môn Kỹ Thuật ĐiệnTử - ĐHBK Chapter 6 26 13
  8. 8/9/2016 Debug and Emulator MPLAB REAL ICE In- MPLAB PICkit 3 for PICkit™ 2 Debug Circuit Emulator System debugging and Express and the PICkit programming 2 Starter Kit PIC18F4XK20 Starter Kit PICDEM PIC18F8722 Starter Kit PIC18F46J50 Bộ môn Kỹ Thuật ĐiệnTử - ĐHBK Chapter 6 29 Exercise 1 Write program that enables 4 LEDs to be turned on gradually in the following sequence: D0 D1 D2 D3 D2 D1 D0 Note that the turning cycle is 1s. Bộ môn Kỹ Thuật ĐiệnTử - ĐHBK Chapter 6 30 15