Labsheet_and_notes
Microcontroller CWM course notes¶
1. The Environment¶
For this module we’re running the PCs with the Knoppix live linux distribution which rather neatly gets around the permissions issues with windows and multiple USB drivers. There are a couple of bits of software we need for the module. This is running from the CD drive so starting software can be a little slow at times.
Don’t whatever you do open the CD drive at any time otherwise you’ll have to reboot the pc and start again.
When you’ve booted the pc you’ll find it looks something like this:
The small icon at the bottom right is the ‘start’ menu but in fact we don’t really need it. The ones we need for microcontroller programming are ‘Console’ and ‘Browser’ . We’ll also use Files which is a file browser much like Explorer on a Microsoft system.
Browser Web-browser to run the online compiler - IceWeasel - this is basically the same as firefox and you can use it to run the online compiler and read the mbed documentation etc - and surf the web....
Console - this is only needed to read the serial output back from the mbed for debugging purposes. You run this and then type the following into it
sudo su
screen /dev/ttyACM0
This will start up the serial terminal - assuming you have an mbed connected at this point, and that its sending some serial data, you should now be able to see it.
Keyboard setting¶
NB – to get the keyboard layout correct for out pcs open the console / terminal window and issue the command
setxkbmap gb
2. Getting Started¶
- 1. boot the pc - this takes a while as it boots from the DVD
- 2. plug in your mbed..
for the KL25Z (big black board) you need to plug into the connector labelled SDA, for the lpc1768 (small blue board) you only have one connector so its pretty simple.
3. start the Files application. Navigate to /media/MBED/ . you should find a file on the mbed called mbed.htm. Open this which will take you to the mbed website where you can create your account to begin programming. If this doesn't work try www.mbed.com
Create an identity using the site by clicking on the ‘Signup’ link This creates a file space for your code, and gives you access to the free online compiler we’ll be using to program the boards for this module. It also provides the collaboration tools to rapidly develop projects with others and exploit routines others have created to rapidly develop powerful applications for your microcontroller board.
Click on the 'mbed Classic Developer site' button at the top right of the page. Then on the next page click login or signup and create yourself an identity.
Once you’ve created an account you should be able to click the link at the top right of the mbed website entitled compiler which opens the Compiler Environment something like this:
It opens with a very good and comprehensive guide to using the system so take a minute or two to read this before going further.