Congratulations to the 15 teams who successfully completed the LED Flash Challenge. The challenge is now complete and all teams should now be moving on to preparing for the Race to the Wall which takes place in three weeks’ time (Wed 21 Oct 2015).
The results for the LED Flash Challenge were as follows:
Rank | Team Number | Time / Date |
---|---|---|
1 | 14 | 16:14 23-9-2015 |
2 | 25 | 16:48 23-9-2015 |
3 | 16 | 17:03 23-9-2015 |
4 | 26 | 17:28 23-9-2015 |
5 | 13 | 18:16 23-9-2015 |
6 | 7 | 18:25 23-9-2015 |
7 | 6 | 18:51 23-9-2015 |
8 | 24 | 19:20 23-9-2015 |
9 | 8 | 19:42 23-9-2015 |
10 | 19 | 19:57 23-9-2015 |
11 | 9 | 17:19 25-9-2015 |
12 | 27 | 17:40 30-9-2015 |
13 | 4 | 17:51 30-9-2015 |
14 | 2 | 17:59 30-9-2015 |
15 | 11 | 18:12 30-9-2015 |
Example code (for an imaginary team number 101):
// // LED Challenge example for MSP430G2452 // Written by Ted Burke - Last modified 30-9-2015 // #include <msp430.h> int main( void ) { WDTCTL = WDTPW + WDTHOLD; // Disable watchdog timer P1DIR = 0b00000000; // P1.0-7 are inputs P2DIR = 0b00001100; // P2.2 and P2.3 are the two LEDs // Configure the Basic Clock Module // This sets the MSP430's clock to a factory calibrated 1 MHz, // which means that any delays we specify will be more accurate DCOCTL = CALDCO_1MHZ; BCSCTL1 = CALBC1_1MHZ; // Main loop repeats forever while(1) { // start bit P2OUT = 0b00001000; __delay_cycles(76923); // one // Team number byte (8 data bits) // My imaginary team number is 101 (one hundred and one), // which in binary is 0b01100101. Remember that the byte // must be transmitted least significant bit first. P2OUT = 0b00001000; __delay_cycles(76923); // one P2OUT = 0b00000100; __delay_cycles(76923); // zero P2OUT = 0b00001000; __delay_cycles(76923); // one P2OUT = 0b00000100; __delay_cycles(76923); // zero P2OUT = 0b00000100; __delay_cycles(76923); // zero P2OUT = 0b00001000; __delay_cycles(76923); // one P2OUT = 0b00001000; __delay_cycles(76923); // one P2OUT = 0b00000100; __delay_cycles(76923); // zero // Stop bit of byte 1 and start bit of byte 2 P2OUT = 0b00000100; __delay_cycles(76923); // zero P2OUT = 0b00001000; __delay_cycles(76923); // one // Data byte 2: The letter 'R' in ASCII // The value for 'R' is 82, which is 0b01010010 P2OUT = 0b00000100; __delay_cycles(76923); // zero P2OUT = 0b00001000; __delay_cycles(76923); // one P2OUT = 0b00000100; __delay_cycles(76923); // zero P2OUT = 0b00000100; __delay_cycles(76923); // zero P2OUT = 0b00001000; __delay_cycles(76923); // one P2OUT = 0b00000100; __delay_cycles(76923); // zero P2OUT = 0b00001000; __delay_cycles(76923); // one P2OUT = 0b00000100; __delay_cycles(76923); // zero // stop bit and long delay before next transmission P2OUT = 0b00000100; __delay_cycles(4000000); // zero } // The program never actually reaches this point return 0; }
Advertisements