Problem

advertisement
Learn by doing
Less is more
Frank Vahid (UC Riverside)
Tony Givargis (UC Irvine)
Programming embedded systems
Computing
system
embedded
inside
Frank Vahid, UC Riverside
2 of 10
Problem: Students currently "hack"
programs
• Learn components, get working,
build systems, no prog. discipline
Frank Vahid, UC Riverside
// ----------------------------------------------------------// configure output ports
// ----------------------------------------------------------ADCON0 = 0x00; /* disable A/D converter */
CM1CON0 = 0x00;
CM2CON0 = 0x00; /* disable comparators */
ANSELH = 0x00;
ANSEL = 0x00;
/* configure pins as digital chanels *
TRISA = 0x08;
/* all bits output except RA3. */
TRISB = 0xF0;
/* Port B inputs*/
RABPU = 1;
WPUB4 = 1;
// enable weak pull ups on RB4
IOCB4 = 1;
// enable interrupt on change for RB4
TRISC = 0x00; /* PORTC all set to outputs */
PORTA = 0x00;
PORTB = 0x00;
PORTC = 0x00; /* initialize ports */
// ----------------------------------------------------------// Timer0 setup
// ----------------------------------------------------------CLRWDT(); // turn off watch dog timer
OPTION = 0x07; // setup prescaler
TMR0 = PRELOAD; // preload timer
T0IE = 1; //enable timer0 interrupts
// ----------------------------------------------------------// Setup button interrupts
// ----------------------------------------------------------RABIE = 1; //Enable change on PORTB interrupts
GIE = 1;
//global interupts enabled
3 of 10
Synchronous state
machines
Want:
Disciplined
"modelbased"
programming
method
Skill+art –
requires
practice
enum SL_States { Wait00, Wait10, … } SL_State;
void SL_Tick()
{
switch(SL_State) { // Transitions
case -1:
SL_State = SL_Wait00;
break;
case SL_Wait00:
if (!(!A1 && !A0)) {
SL_State = SL_Wait00;
}
else if (!A1 && !A0) {
SL_State = SL_Wait10;
}
break;
…
Frank Vahid, UC Riverside
4 of 10
Solution: Virtual Lab
• Interactive online learning
– Learn by doing
• Used for all lecture homeworks
– Huge improvement over pencil/paper
•
http://www.youtube.com/watch?v=M0f3X4OGSSw
Developed
with NSF
CCLI funds
Frank Vahid, UC Riverside
5 of 10
Learn by doing
Less is more
Frank Vahid, UC Riverside
6 of 10
e.g., "… read
on average
27% assigned
readings before
class … 70%
before exam
… decline in
compliance
over 16 years
… less than 3
hrs/wk" [Michael A.
Info overload
Problem: Students aren't reading
Clump, Heather Bauer,
Catherine Bradley; Journal of
Instructional Psychology, Vol.
31, 2004]
$108
Plus slides,
class notes, lab
manual, lab
assignments,
lab simulator,
homework
assignments,
study guides, …
Cost
http://www.gao.gov/new.items/d05806.pdf
Frank Vahid, UC Riverside
7 of 10
Solution: Short, low-cost book
http://www.youtube.com/wat
ch?v=6yAYXr2CxvE
120 pages, $50
(e-book or print-ondemand), small publisher
Developed
with NSF
CCLI funds
• Focus on essentials (web is today's reference)
• Break from "cover everything" / "firehose" tradition
• No slides: Short enough to use book as slides (students love this)
• Less is more. Most students read/study all material
Frank Vahid, UC Riverside
8 of 10
So far…
• 7 physical offerings in 2 years
– 5 UCR, 2 UCI, 5 different teachers
– Extensive use of virtual lab and e-book
– Physical lab and lecture still included
• Positive teacher/student feedback
• Student performance strong
Frank Vahid, UC Riverside
9 of 10
Logical evolution...
•
Today: engineering textbook author creates:
– Book, slides, exercise solutions, lab manual
– Simulator / virtual lab
– Homeworks, quizzes (CourseSmart.com)
•
Logical evolution
1. Author creates entire "course-in-a-box" – add (short) video lectures,
exams. More interactive tools (e.g., online checking/correcting/hinting...)
2. Author runs course (online) – Manage assignments/exams, use
proctored test facilities, online/skype help/office-hrs, assign grades.
Economy/Quality of scale…
+
Frank Vahid, UC Riverside
10 of 10
Download