8051 actually... I can apparently teach it "any way I want" - except I have a week before class starts, we have no development boards (only emulators) and the teaching material that I've got from the incumbent is mountainous but disorganised (and lots of it is on acetates).
If only I had 3 months, money to spend, and about 100 arduinos... (Ian T seems to love them).
PICs are weird because they've got an awkward paged RAM scheme, often with different amounts of RAM on each page, sometimes shared across all pages, sometimes not. It seems to vary across different devices, making porting a minefield.
Sound like you need Andrew's CS without any C video, posted recently.
The Arduino that Ian had seemed quite funky - although I thought he was a little too proud of the fact that it lit up a multi-coloured LED set. I've seen students build an entire ENIGMA machine, including RS232 interface to old keyboard before out of a M16C. Also - it has it's own language?! And what is an Arduino exactly - it's not the actual microcontroller is it? The chip is made by Atmel...?
Arduino is an Atmel AVR microcontroller (various form-factors, various processor flavours) with avr-gcc and a bunch of libraries to make things like PWM output simpler than setting up the control registers yourself. It is C/C++ with a bit of pre-preprocessing to auto-generate (most) prototypes. 10 bit, six channel ADC, four PWM outputs, USB interface, bootloader, a K or two or RAM, minimum of 16K of flash (Harvard architecture), some EEPROM, open source design, free IDE, very cheap - really quite nice.
I'd imagine it to be a pretty good teaching platform - you can start off with the safety-net of the built-in libraries (timers, pin mapping, PWM, ADC, R/C servos), and then let students go off-piste, because all the underlying facilities are still available.
A simple program to drive an R/C servo from a potentiometer comes in at about four lines of actual code:
#include Servo myServo; const int potPin = 0; const int servoPin = 3; void setup () { myServo.attach (servoPin); }
void loop () { int potVal = analogRead (potPin); int servoPos = map (potVal, 0, 1023, 0, 180); // just map the 10 bit ADC to "degrees" of turn myServo.write (servoPos); }
www.arduino.cc
According to the forum, IT is looking to put Forth on his. Not sure how well that goes on Harvard.
That's funky.
ReplyDeleteFor someone who is about to teach microcontrollers for the first time (in about a week)... this is actually quite scary.
Arduino, Arduino, Arduino.
ReplyDeletePICs are just weird.
8051 actually... I can apparently teach it "any way I want" - except I have a week before class starts, we have no development boards (only emulators) and the teaching material that I've got from the incumbent is mountainous but disorganised (and lots of it is on acetates).
ReplyDeleteIf only I had 3 months, money to spend, and about 100 arduinos... (Ian T seems to love them).
(Why are PICs weird?)
PICs are weird because they've got an awkward paged RAM scheme, often with different amounts of RAM on each page, sometimes shared across all pages, sometimes not.
ReplyDeleteIt seems to vary across different devices, making porting a minefield.
Sound like you need Andrew's CS without any C video, posted recently.
Ah right. I haven't used PICs before.
ReplyDeleteThe Arduino that Ian had seemed quite funky - although I thought he was a little too proud of the fact that it lit up a multi-coloured LED set. I've seen students build an entire ENIGMA machine, including RS232 interface to old keyboard before out of a M16C. Also - it has it's own language?! And what is an Arduino exactly - it's not the actual microcontroller is it? The chip is made by Atmel...?
Arduino is an Atmel AVR microcontroller (various form-factors, various processor flavours) with avr-gcc and a bunch of libraries to make things like PWM output simpler than setting up the control registers yourself.
ReplyDeleteIt is C/C++ with a bit of pre-preprocessing to auto-generate (most) prototypes.
10 bit, six channel ADC, four PWM outputs, USB interface, bootloader, a K or two or RAM, minimum of 16K of flash (Harvard architecture), some EEPROM, open source design, free IDE, very cheap - really quite nice.
I'd imagine it to be a pretty good teaching platform - you can start off with the safety-net of the built-in libraries (timers, pin mapping, PWM, ADC, R/C servos), and then let students go off-piste, because all the underlying facilities are still available.
A simple program to drive an R/C servo from a potentiometer comes in at about four lines of actual code:
#include
Servo myServo;
const int potPin = 0;
const int servoPin = 3;
void setup ()
{
myServo.attach (servoPin);
}
void loop ()
{
int potVal = analogRead (potPin);
int servoPos = map (potVal, 0, 1023, 0, 180); // just map the 10 bit ADC to "degrees" of turn
myServo.write (servoPos);
}
www.arduino.cc
According to the forum, IT is looking to put Forth on his. Not sure how well that goes on Harvard.
http://mbed.org/nxp/lpc1768/
ReplyDelete