Você está na página 1de 10

EMBEDDED

SYSTEM
PROGRAMMING
PROJECT
WSC2017_TP16_UK_EN

Submitted by:
Name: XXXXX. XXXXXX
Member country or region: UK

WSC2017_TP16_UK_EN
CONTENTS
This Test Project proposal consists of the following documentation/files:
1. WSC2017_TP16_UK_EN.doc
2. WSC2017_TP16_UK_01_EN.pdf Task Board Schematic
3. WSC2017_TP16_UK_02_EN.pdf World Skills CPU Board Schematic
4. WSC2017_TP16_UK_03_EN.pdf Component Datasheet
5. WSC2017_TP16_UK_04_EN.pdf Component Datasheet
6. WSC2017_TP16_UK_05_EN.zip Project Files Task Phase 1
7. WSC2017_TP16_UK_06_EN.zip Project Files Task Phase 2
8. WSC2017_TP16_UK_07_EN.zip Project Files Demonstration Phase 1
9. WSC2017_TP16_UK_08_EN.zip Project Files Demonstration Phase 2

INTRODUCTION

DESCRIPTION OF PROJECT AND TASKS


The task is split into 2 programming tasks.
1. Functions to control the hardware.
2. Simulation of

Version: 0.1
WSC2017_TP16_UK_EN 2 of 10
Date: 14.8.2017
INSTRUCTIONS TO THE COMPETITOR

PROGRAMMING ENVIRONMENT

Figure 1. Programming setup

1 Task Board
2 World Skills CPU Board
3 ST Link V2
4 12V DC supply

OVERVIEW OF XXXXX SIMULATOR

TASK BOARD

Version: 0.1
WSC2017_TP16_UK_EN 3 of 10
Date: 14.8.2017
Figure 2. Task Board

1
2 Display
3
4
5
6
7
8

TABLE 1. SIGNALS BETWEEN CPU BOARD AND TASK BOARD

Version: 0.1
WSC2017_TP16_UK_EN 4 of 10
Date: 14.8.2017
CPU
GPIO Type Signal Name Notes
PC14 GPIO_Output
PC15 GPIO_Output
PA0 GPIO_EXTI0
PA1 GPIO_EXTI1
PA2 GPIO_EXTI2
PA3 GPIO_EXTI3
PA4 GPIO_Output
PA5 GPIO_Output
PA6 GPIO_Output
PA7 GPIO_Output
GPIO_Input
PA8 with Pull Up
PA9 GPIO_Output
PA10 GPIO_Output
PA15 GPIO_Output
PB0 GPIO_Output
PB1 GPIO_Output
PB3 GPIO_Output
PB4 GPIO_Output
PB5 GPIO_Output
PB6 GPIO_Output
PB7 GPIO_Output

Table 1. Shows task board driving signals. Use signal names from table 1 with HAL_GPIOWritePin and
HAL_GPIO_ReadPin functions.

Here are examples how to use HAL_GPIO_WritePin function:


HAL_GPIO_WritePin(CHIP_RS_GPIO_Port, CHIP_RS_Pin, GPIO_PIN_RESET);
HAL_GPIO_WritePin(CHIP_RS_GPIO_Port, CHIP_RS _Pin, GPIO_PIN_SET);

Next is an example how read with HAL_GPIO_ReadPin function:


If (HAL_GPIO_ReadPin(CHIP_DI_GPIO_Port,CHIP_DI_Pin)== 0)

PROGRAMMING TASKS

This programming task will be done in two parts. Before you begin you will be able to see a finished
presentation of the task.

You will then get a project file template. In this file all CPU Hardware Abstraction Layer (HAL) and General
Purpose Inputs/Outputs (GPIO) initializations have been done. There is also parts of code where you can
find examples on how to use some library functions.

Version: 0.1
WSC2017_TP16_UK_EN 5 of 10
Date: 14.8.2017
The First part is a hardware dependent phase. Once you get the phase done, call a judge to check that the
function performs as asked. Do not proceed to the second part until you have permission from the judge.

In the second part you will get a new project file. In this project the previous hardware tasks in part 1 have
been completed for you.

For both sections, you also receive demonstration files and projects. You can use these projects/files for
downloading and viewing/testing for the required functionality of the tasks.

You can either load the demonstration .hex file using ST-LINK Utility
Use File->Open file. to load the .hex file, and Target->Program & Verify. to write the
demonstration file to the task board.

Alternatively you can load the demonstration projects into Kiel and download the demonstration code onto
the task board.

Open the project file in Keil using Project-> Open Project. and press the load icon , or use
Flash->Download, or press F8.

PROGRAMMING PART 1

General notes for programming in part 1.

In the first phase you need SET (to HIGH level) and RESET (to LOW level) task board signals (Table
1). Remember always put a small delay (minimum 5 us) after setting or resetting signals because
some of the task board ICs signals needs to settle before the next signal can be set or reset.

Load up the phase1 project in Keil

Phase 1.1
With reference to the data sheets and schematics, complete the function which

Table 2.

OFF

Phase 1.2
Add a test in the main loop as shown in Table 3.

Table 3.

Version: 0.1
WSC2017_TP16_UK_EN 6 of 10
Date: 14.8.2017
OFF

After you have made this function and test code of this phase 1, call a judge and show it to them.
You will be marked for phase 1 at this time.
You can move onto phase 2 without completing phase 1, but you cannot return to complete phase 1
later, and will only receive marks for phase 1 if shown to a judge at this stage.

PROGRAMMING PART 2

You can see presentation of finished program by loading the demonstration version of phase 2.
You can view this at any time, but please use the correct Project for phase2 for this task.

PROGRAM REQUIREMENTS

Table 4. Display layout

1
2
3
4
5
6
7
8
9

Version: 0.1
WSC2017_TP16_UK_EN 7 of 10
Date: 14.8.2017
10

Table 5.

Load part 2 project in Kiel.

Phase 2.1

Phase 2.2

Phase 2.3

Version: 0.1
WSC2017_TP16_UK_EN 8 of 10
Date: 14.8.2017
Phase 2.4

Phase 2.5

Phase 2.6

Phase 2.7

Version: 0.1
WSC2017_TP16_UK_EN 9 of 10
Date: 14.8.2017
EQUIPMENT, MACHINERY, INSTALLATIONS AND MATERIALS
REQUIRED

ITEM QUANTITY MATERIAL DESCRIPTION NOTES

Task Board 1 Main Project


PCB

World Skills CPU 1


Board

ST Link V2 1

MARKING SCHEME NOTES

OTHER

Version: 0.1
WSC2017_TP16_UK_EN 10 of 10
Date: 14.8.2017

Você também pode gostar