Professional Documents
Culture Documents
EE-522
EE
522 Term Schedule
W1:27/1
Intro
W1:29/1
RT-Scheduling
W2:3/2
Static Scheduling
Algos
W3:10/2
Dynamic Scheduling
Algos
W3:12/2
Mem-mapped I/Os,
GPIO etc.
W4:17/2
Lab1
(EasyPICV6/7)
W4:19/2
Lab2
(EasyPICV6/7)
W5:24/2
Aperiodic Schedulers
W5:26/2
Commercial RTOS
W6:3/3
Linux Device
Drivers
W6:5/3
Lab3
(VM-Linux Kernel)
W7:10/3
Commercial RTOS
W7: 12/3
Resource Sharing
W8:17/3
Lab4
(Mini6410)
W8:19/3
Mid term
W9:31/3
Lab5
(Mini6410)
W9:2/4
Resource Sharing in
MP
W10:7/4
RT Comm.
W10:9/4
RT Comm.
W11:14/4
Lab6
(Mini6410)
W11:16/4
Lab7
b7
(Mini6410)
W12:21/4
: /
RT Databases
W12:23/4
b
Lab8
(Mini6410)
W13:28/4
Lab9
b
(Mini6410)
W13:30/4
Lab10
b
(Mini6410)
W14:5/5
Lab11
(Mini6410)
W14:7/5
Lab12
(Lab Project)
W15 (W2):12/5
Lab13
(Lab Project)
EE-522
Fi l Exam
Final
E
2/17/2015
Features
RISC-based processor
Operating frequency up to (48MHz)*
32-35 GPIOs
3 Timers (T0, T1, T2)
Internal 10-bit ADC
USART
2.0V
2 0V to 55.0V
0V working
ki range+
* 20MHz mentioned in Datasheet
+ Depends on X in18X452
3
EE-522
2/17/2015
Compiler
We will be usingg CCS PICC
Built-in RTOS library
Has an extension of cyclic
y scheduler for RT-task schedulingg
Supports multi-tasking and delay functions
Non-preemptive scheduler
User friendly
Built-in functions for I/Os
Support for standard C functions e.g. printf , scanf , etc.
EE-522
2/17/2015
//TurnsallPINSonPortBhigh
output_low(PIN_B5);
//OnlyPIN5ofPortBwillbehigh
output_high(PIN_B4);
//OnlyPIN4ofPortBwillbelow
output_toggle(PIN_B3);
//TogglePIN3ofPortB
input_b();
//TurnsPortBasinputandreturnscomplete
//1byteofdatavaluestoredatPortB
input(PIN_B7);
EE-522
//TurnsPIN7ofPORTBasinputandreturns
//singlebiti.e.1ifitishighelse0
2/17/2015
EE-522
2/17/2015
EE-522
2/17/2015
Softwares Needed
PIC-C Programming Environment
MikroProg Suite for PIC to program the PIC18F452
Hyper Terminal for serial output on Windows
Make sure all of them are installed on the PC where you are
working
Don
Dontt login using your
our ID
ID, use EELAB with
ith Lums12345
EE-522
2/17/2015
SWs Needed
EE-522
2/17/2015
LAB-1 Handout
10
EE-522
2/17/2015
PICC-RTOS
PICC
RTOS API
# use rtos (options)
timer
ti
minor_cycle
statistics
# task (options)
rate
max
rtos_run()
rtos_terminate()
rtos_enable(task)
rtos_disable(task)
11
EE-522
rtos_stats()
rtos_overrun()
rtos_await
_
((express)
p )
rtos_wait(sem)
rtos signal(sem)
rtos_signal(sem)
rtos_yield ()
2/17/2015
12
EE-522
voidmain()
{
out=0xFF;
rtos_run();
sleep();
}
2/17/2015
PICC-RTOS
PICC
RTOS Scheduler Semantics
13
EE-522
2/17/2015
LAB-1 Handout
14
EE-522
2/17/2015
Quiz Time
15
EE-522
2/17/2015