How to teach LPC's ARM?

Started by Gaspar Pollano March 12, 2009
Hi forum members!

Im a junior Electronics Engineer from Argentina, with middle experience on LPC's uC (LPC2148 mostly).
I use this LPC uC for my final graduate-project last year.
Since then, the teachers of "Digital & Embedded Electronics" class (university teachers with vast experience on 8051's, PIC's, 6800's, Z80, but few experience on LPC's ARM) are planning to re-design the way they teach uCs, migrating from teaching "Z80 and PIC" to teach "PIC and ARM (LPC's)".
They ask me for some advice on how the classes would be organized, mainly they are looking what kind of "practical jobs" are needed to get the skills to successfully learn LPC's ARM.

The "Digital & Embedded Electronics" students come with vast experience on Combinational & Sequential Digital Electronics, middle experience on PIC (16F series), and light ANSI C programming skills.
The hardware used by the students should be something like Olimex P-2148 boards, with JTAG Debugger (ARM-USB-OCD)

The class is dictated in one semester, so there is time enough to do about six or seven "practical jobs".

What kind of practical subjects would you suggest are essential?

Mi original idea was starting from "blinking LED" to implement LPCUSB and EFSL.

Thanks in advance, and apologies for my ugly English,
Gaspar.

An Engineer's Guide to the LPC2100 Series

Gaspar Pollano said: Thursday, March 12, 2009 11:50 AM
> The class is dictated in one semester, so there is time
> enough to do about six or seven "practical jobs".
>
> What kind of practical subjects would you suggest are
essential?

I am currently teaching a Digital Electronics and Robotics
course at University of Northern Iowa (USA) remotely from my
Dallas TX (USA) office . I've choosen to use a Mini-Sumo robot
as the focus for the course. It seems student interest in
robotics drives the learning of the other material. At the end
of the course we have an Open contest where we invite Mini-Sumo
robots from around the world to "Ship-In" and compete with us.
This program has been very successful. We cram a huge amount of
subjects from digital logic to real time programming concepts
into a single semester course. Plus we are now experimenting
with a lab for beginning general ed students, and the same
course (with much greater content) for graduate level students.
It works both ways, and is becoming a very popular course(s).

With the robotic theme, we can explore many sensors and many
aspects of interfacing, digital, analog, serial, and so on. Each
is like a "practical job" as you suggest.

Hope the idea is of help,

Randy M. Dumse

--- In l..., "Randy M. Dumse" wrote:
>
> Gaspar Pollano said: Thursday, March 12, 2009 11:50 AM
> > The class is dictated in one semester, so there is time
> > enough to do about six or seven "practical jobs".
> >
> > What kind of practical subjects would you suggest are
> essential?
>
> I am currently teaching a Digital Electronics and Robotics
> course at University of Northern Iowa (USA) remotely from my
> Dallas TX (USA) office . I've choosen to use a Mini-Sumo robot
> as the focus for the course. It seems student interest in
> robotics drives the learning of the other material. At the end
> of the course we have an Open contest where we invite Mini-Sumo
> robots from around the world to "Ship-In" and compete with us.
> This program has been very successful. We cram a huge amount of
> subjects from digital logic to real time programming concepts
> into a single semester course. Plus we are now experimenting
> with a lab for beginning general ed students, and the same
> course (with much greater content) for graduate level students.
> It works both ways, and is becoming a very popular course(s).
>
> With the robotic theme, we can explore many sensors and many
> aspects of interfacing, digital, analog, serial, and so on. Each
> is like a "practical job" as you suggest.
>
> Hope the idea is of help,
>
> Randy M. Dumse
>

Just a suggestion...

Perhaps you could use a BASIC language for the ARM that would simplify your interfacing:

http://jumentum.sourceforge.net/

This can be programmed through a web page.

Daniel Marks

> Perhaps you could use a BASIC language for the ARM that would simplify your interfacing:
>
> http://jumentum.sourceforge.net/
>
> This can be programmed through a web page.
>
> Daniel Marks
>

That's a pretty neat setup. At first I defaulted to thinking "Basic? That'll set programming back 20 years. Again!"

But this slick! I have the LPC2148 board and I may just give it a go!

Richard

Hi

Few other language options :-

http://armpit.sourceforge.net/
http://www.freepascal.org

regards

Nataraj

On Mon, Mar 16, 2009 at 8:21 AM, profdc9 wrote:
> --- In l..., "Randy M. Dumse" wrote:
>>
>> Gaspar Pollano said: Thursday, March 12, 2009 11:50 AM
>> > The class is dictated in one semester, so there is time
>> > enough to do about six or seven "practical jobs".
>> >
>> > What kind of practical subjects would you suggest are
>> essential?
>>
>> I am currently teaching a Digital Electronics and Robotics
>> course at University of Northern Iowa (USA) remotely from my
>> Dallas TX (USA) office . I've choosen to use a Mini-Sumo robot
>> as the focus for the course. It seems student interest in
>> robotics drives the learning of the other material. At the end
>> of the course we have an Open contest where we invite Mini-Sumo
>> robots from around the world to "Ship-In" and compete with us.
>> This program has been very successful. We cram a huge amount of
>> subjects from digital logic to real time programming concepts
>> into a single semester course. Plus we are now experimenting
>> with a lab for beginning general ed students, and the same
>> course (with much greater content) for graduate level students.
>> It works both ways, and is becoming a very popular course(s).
>>
>> With the robotic theme, we can explore many sensors and many
>> aspects of interfacing, digital, analog, serial, and so on. Each
>> is like a "practical job" as you suggest.
>>
>> Hope the idea is of help,
>>
>> Randy M. Dumse
>> Just a suggestion...
>
> Perhaps you could use a BASIC language for the ARM that would simplify your
> interfacing:
>
> http://jumentum.sourceforge.net/
>
> This can be programmed through a web page.
>
> Daniel Marks
--- In l..., "Gaspar Pollano" wrote:
>
> Hi forum members!
>
> Im a junior Electronics Engineer from Argentina, with middle experience on LPC's uC (LPC2148 mostly).
> I use this LPC uC for my final graduate-project last year.
> Since then, the teachers of "Digital & Embedded Electronics" class (university teachers with vast experience on 8051's, PIC's, 6800's, Z80, but few experience on LPC's ARM) are planning to re-design the way they teach uCs, migrating from teaching "Z80 and PIC" to teach "PIC and ARM (LPC's)".
> They ask me for some advice on how the classes would be organized, mainly they are looking what kind of "practical jobs" are needed to get the skills to successfully learn LPC's ARM.
>
> The "Digital & Embedded Electronics" students come with vast experience on Combinational & Sequential Digital Electronics, middle experience on PIC (16F series), and light ANSI C programming skills.
> The hardware used by the students should be something like Olimex P-2148 boards, with JTAG Debugger (ARM-USB-OCD)
>
> The class is dictated in one semester, so there is time enough to do about six or seven "practical jobs".
>
> What kind of practical subjects would you suggest are essential?
>
> Mi original idea was starting from "blinking LED" to implement LPCUSB and EFSL.
>
> Thanks in advance, and apologies for my ugly English,
> Gaspar.
>
Hi,

I am teaching the Cortex-M3 core / microcontrollers and your question is very important to get the attention of the students as well as to make sure they can program the device later on.
There are a couple of things very important to understanding the MCU such as the interrupt system, the multiple processor modes (user mode, SVC, IRQ, FIQ), differences between ARM Mode and Thumb mode, when to use which one.
Your idea to start out with a blinky is absolutely correct, something has to work before continuing to more complex tasks.
The leap you are expecting the students to perform, from blinky to LPCUSB is huge. Don't know how well that is going to work.
A couple more things that are a bit tricky to handle and could use practical examples are:
1. Fractional baudrate generator, getting 115200 Baud using a system frequency of 48 or 60 MHz
2. Fast I/O, the only way to use software to simulate serial protocols or other serial data with appropriate speed.
3. Using the ADC and the DAC to sample sound and to create sound. You can sample a voice with the ADC, modify it and feed it back through the DAC with a small speaker.

Hope this provided some ideas.
btw. your English may be better than you think it is :-)

Robert

http://www.mcu-related.com

Hi all, and thanks for the replies,

\\ Randy M. Dumse wrote:
> I've choosen to use a Mini-Sumo robot
> as the focus for the course. It seems student interest in
> robotics drives the learning of the other material.

That's a great idea Randy. However the students of my University do not have full time to do this particular course. They have 3~4 simultaneos courses to do. The idea is really great, but seems very expensive in terms of time and money (at least for my country). Some of the subjects are very exciting (i.e sensor intrerface motor control) and could be included.
I hope that on a soon future, the argentinians students could proudly compete on the Mini-Sumo robot's contest.

\\ Daniel Marks wrote:
> Perhaps you could use a BASIC language for the ARM that would
> simplify your interfacing
also
\\ Richard wrote:
> That's a pretty neat setup.
and also Nataraj

I prefer teching/using ANSI C with a toolchain like Yagarto, because the students already has an Assembler base knowledge (well.. PIC ASM) and a middle PC-Programming skills, and mainly becouse is relevant (for my point of view) learn uC-oriented ANSI C for a graduate level student.

\\ Robert wrote:
> There are a couple of things very important to understanding the MCU such as the
> interrupt system, the multiple processor modes (user mode, SVC, IRQ, FIQ),
> differences between ARM Mode and Thumb mode, when to use which one.

> The leap you are expecting the students to perform, from blinky to > LPCUSB is huge.

What to do?
a. Teach the "hardcore" way: ARM arquitecture, ARM processor Modes, Thumb mode, stack managment, etc.
OR
b. Small arquitecture introduction, and use the rest of the semester on entire ANSI C peripheral oriented projects (with crt.s file provided "AS IS"), interrupts contolled via C Macros (again provided "AS IS") and so on (...Yes Robert, jump from Blinky to LPCUSB is a *big* leap, but they not need to know everthing about USB, not even ARM assembler to write/read a FAT formated SD card via USB).

Seems a dificult question. What is the student's profile? Well, they are theorically "hardcore" oriented (remember, they learn uP with Z80) with some hardware design skills. But if they just learn PIC, they dont get any experience on something more powerfull like ARM.
Its "a must" learn ARM aquitecture? Or this can be readed from the manual further?

\\ Robert also wrote:
> A couple more things that are a bit tricky to handle and could use practical examples are:
> 1. Fractional baudrate generator, getting 115200 Baud using a system frequencyof 48 or 60 MHz
> 2. Fast I/O, the only way to use software to simulate serial protocols or other serial data with appropriate speed.
> 3. Using the ADC and the DAC to sample sound and to create sound. You can sample a voice with the ADC, modify it and feed it back through the DAC with a small speaker.

Great ideas.
Examples 1 and 2 are more "a"-way oriented. Example 3 are more "b"-way oriented. Maybe a blend of the two ways is the best choice.
I'm sure that the ARM arquitecture is important, and must be learned. I'm sure too that say: "Hey guys, lets make a SD reader via USB" to the class will increase the students enthusiasm.

Thanks again for the usefull replies.
Gaspar