III - Advanced Project » History » Version 25

Version 24 (COLIN, Tony, 12/14/2015 08:59 AM) → Version 25/59 (COLIN, Tony, 12/14/2015 09:28 AM)

h1. III - Advanced Project. Project

{{>toc}}

h2. 1. Adapting project to elementary task. task

See [[Wiki#"3. Creation of a simple MPLAB X IDE project"|Tutorial page]] for project bases
In this part, you will have to modify particular files of the previous Test/.


h3. 1.1 Integrating C Source files into task.

* task_name.c stating _void task_name (void) { ... }_.
task_example.c
Here you can either call the C main function in the task_name function or adapting your main file into a task.

* task_name.h stating _extern void task_name (void);_ and other intern functions.

h3. 1.2

*
task_example.h
tasks.h defining OSTCBP of all predifined tasks (way of specifying a pointer to a particular Salvo _Task Control Block_). More information available on Salvo User Manual.

*

task_cmd.c which is a tool provided by Test/ that allows to resume/stop your task.
!task_cmd.png!

*

main.c which is the basic implementation to call your task(s).
!main.png!

---

h2. 2. Integration of a Reed-Solomon encoder/decoder. encoder/decoder

A highly convenient implementation of a Reed-Solomon code is available on "RS Code Website":http://rscode.sourceforge.net/ and will be integrated in the following.

h3. 2.1 Presentation of Reed-Solomon. Reed-Solomon

h3. 2.2 Task Example.

---

Example

h2. 3. Displaying results. results

h3. 3.1 In simulation. simulation

p=. !CodingWin3.png!
*Message of 87 characters*

p=. !CodingWin2.png!
*Code of adding errors*

p=. !UART1.png!
*Checking Output UART Window*

p=. !CodingWin1.png!
*Displayed result*

h3. 3.2 On board. board

|_.- |_.Char |_.Code ASCII |_.Hexadecimal |_. Binary |
|_.Codeword |=. 2 |=. 50 |=. 0x32 | 0b00110010 |
|_.Erroneous Codeword |=. 3 |=. 51 |=. 0x33 | 0b00110011 |

!LEDs_resized.png! !LEDs_error_resized.png! !LEDs_resized.png!
__________________ *a. Codeword : 0bXX110010* ________________________ *b. Erroneous codeword : 0bXX110011* ____________________ *c. Corrected codeword : 0bXX110010* ______________

---



h2. 4. Measurement of encoding/decoding time. time

p=. !Clock1.png!
*1000 ticks per milliseconds*

p=. !Clock2.png!
*Time measurement of data encoding*

p=. !Clock3.png!
*Printing clock data*

p=. !Time_RS_resized.PNG!
*Chart of Reed Solomon time measurement*