Download presentation
Presentation is loading. Please wait.
Published byCordelia Wilkerson Modified over 9 years ago
1
KEG-012 A.K.A. EMMA AND DAVE’S GROUPS Design Projects
2
Week 1 Recap What (we hope) you learned last week… The Task First Challenge Documenting your journey (wordpress.com)
3
The Task Race to the wall Week 6: 23/02/2015 Basic kit provided Start on black, hit wall, return to black (AND STOP!) RoboSumo Week 12: 20/04/2015 Good idea to supplement kit provided (max. budget €70) Competition to find and force your opponent off the table, or to avoid being forced off yourself (table is black with a white edge). Last semester’s tournament details can be found below: https://robosumo.wordpress.com/2014/12/01/important- robosumo-tournament-information/ https://robosumo.wordpress.com/2014/12/01/important- robosumo-tournament-information/
4
First Challenge LED Key challenge Basic circuit components MSP430 and LaunchPad MSP430 and LaunchPad C programming C programming Binary Binary Images sourced from http://www.clker.com/, http://www.williamson-labs.com/, http://en.wikipedia.org/wiki/ and http://www.ti.com/.http://www.clker.com/http://www.williamson-labs.com/http://en.wikipedia.org/wiki/http://www.ti.com/
5
MSP430 and LaunchPad Device Pinout Connections for programming Power MUST be going to the chip (Vcc) Connect LaunchPad to chip: GND TEST RST Important pins to note: Vcc: ~3.3 V GND (DVss) TEST & RST Inputs/Outputs Port 1: P1.0-P1.7 Port 2: P2.0-P2.7 Image from the datasheet for the MSP430G2452 available at: http://www.ti.com/lit/ds/symlink/msp430g2112.pdf http://www.ti.com/lit/ds/symlink/msp430g2112.pdf
6
C programming Documentation At the start of your code always include something similar to: // // Description of code for MSP430G2553 or MSP430G2452 // Written by NAME last modifed DATE // See http://robosumo.wordpress.com/msp430/ // Throughout your code include comments! Include the library for the MSP430 #include Main program int main( void ) { } Disable watchdog timer WDTCTL = WDTPW + WDTHOLD; The watchdog timer is a safety mechanism which will carry out a controlled system restart should a software problem arise. It will reset the system if a specified time interval elapses. We disable this within our program as it is not necessary. Specify pin directions i.e. inputs vs. outputs (P1DIR/P2DIR) Inputs = 0 Outputs = 1 Each bit or pin must be specified. The default is 0 i.e. input. Outputs(P1OUT/P2OUT) It is not possible to just write one single bit/pin. Thus you must specify the full byte e.g. to turn on P1.2 and leave all other pins of port 1 low, you would type P1OUT = 0b00000100; Delay intervals __delay_cycles(X) Where X is the number of cycles to pause for. For the MSP430G4252 this equates to approximately X microseconds.
7
Binary Binary is a numbering system just like decimal or hexadecimal. Binarydecimal hexadecimal Instead of counting to the base 10 (decimal) or 16 (hexadecimal), it counts to the base 2. In C programming a binary number is written as: 0bXXXXXXXX Each X refers to an individual bit of the byte of memory for the specific number. Least significant (LSB) vs. most significant (MSB) bit LSB = bit with lowest weighting or value (furthest right) MSB = bit with highest weighting or value (furthest left)
8
Documenting your journey ALL students MUST maintain a blog of their experiences (wordpress.com) This accounts for part of your grade and should be taken seriously from the start. See more details here: https://robosumo.wordpress.com/moduleinformati on/ https://robosumo.wordpress.com/moduleinformati on/ Technical content IS required! Some issues encountered by students last semester have been addressed in the following post: https://emmarobinsondit.wordpress.com/blog- entriesthe-basics/ https://emmarobinsondit.wordpress.com/blog- entriesthe-basics/
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.