1. Trang chủ
  2. » Kỹ Thuật - Công Nghệ

LAB3: Learning the Development Environment

13 254 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 13
Dung lượng 152,19 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Tinh chỉnh thiết kế ở lab 2 bằng cách: Tích hợp thêm một số tính năng mới: Phím điều khiển Giao tiếp với máy tính Startup Task Timer Interrupt and Time Base A Dynamic Scheduler Flow Rate Measurement OLED Display Local Keypad Local Serial Communications

Trang 1

LAB3: Learning the Development Environment

The Next Step

REPORT

Nhóm :

1 Trần Xuân Việt 11DT2

Trang 2

1 Mục đích của bài lab:

• Tinh chỉnh thiết kế ở lab 2 bằng cách:

– Tích hợp thêm một số tính năng mới:

+ Phím điều khiển + Giao tiếp với máy tính

Trang 3

2 Khái quát yêu cầu chung:

• Startup Task

• Timer Interrupt and Time Base

• A Dynamic Scheduler

• Flow Rate Measurement

• OLED Display

• Local Keypad

• Local Serial Communications

Trang 4

XÂY DỰNG SƠ ĐỒ USE CASE CHO HỆ THỐNG

Trang 5

XÂY DỰNG FUNCTION

DECOMPOSITION

Trang 6

XÂY DỰNG CLASS DIAGRAM

Trang 7

FUNCTION PROTOTYPES

• void Measure (void* taskDataPtr);

• void Compute (void* taskDataPtr);

• void Status (void* taskDataPtr);

• void KeypadConsole (void* taskDataPtr);

• void LocalComs (void* taskDataPtr);

• void OLEDdisplay (void* taskDataPtr);

• void WarningAlarm (void* taskDataPtr);

Trang 8

struct MyStruct

{

void (*myTask)(void*);

void *taskDataPtr;

struct MyStruct *next;

struct MyStruct *prev;

};

TCB struct

Trang 9

void OLEDdisplay (void* dt)

{

display* temp=dt;

RIT128x96x4StringDraw("Temperature: ",0,40,15); print_integer(*(temp->tempCorrectedPtr),78,40,15);

RIT128x96x4StringDraw("Flow Rate:",0,55,15);

print_integer(*(temp->flrCorrectedPtr),66,55,15);

RIT128x96x4StringDraw("CarbonLevel:",0,70,15); print_integer(*(temp->carbonLevelCorrectedPtr),78,70,15);

RIT128x96x4StringDraw("SalinityLevel:",0,85,15); print_integer(*(temp->salinityLevelCorrectedPtr),90,85,15);

RIT128x96x4StringDraw("Battery: ",0,0,15);

print_integer(*(temp->batteryStatePtr),50,0,15);

}

OLED display function

Trang 10

CẢI TIẾN CỦA HỆ THỐNG

• Timer Interrupt and Time Base: Thay thế software delay bởi hardware timer

interrupt

Local Software Delay Global Counter

System Time Base Time Base Reference

System Time

Local

System Time Base Time Base Reference

System Time

Trang 11

• Local Serial Communication: dữ liệu có thể

được hiển thị trên OLED hoặc màn hình máy tính thông qua cổng serial của vi xử lý.

• Keypad: sử dụng thêm các phím keypad trên kit

và các phím keyboard của máy tính để điều khiển hoạt động của hệ thống

Trang 12

Demo Lab 2

Trang 13

THANKS FOR YOUR

LISTENNING

Ngày đăng: 24/12/2015, 00:25

TỪ KHÓA LIÊN QUAN