| Electronic Components Datasheet Search |
|
SWRU318 Datasheet(PDF) 29 Page - Texas Instruments |
|
|
|||||||||||||||||||||||||||||
SWRU318 Datasheet(HTML) 29 Page - Texas Instruments |
|
29 / 36 page ![]() swru318 29/31 A.7 Write Software At this point, the project is configured and you can write your first lines of code. We will show a small blinking LED example. In the project, create a new file that you save as blinky.c. Type the following code: #include <ioCC2543.h> int main(void) { int i; // Set P1.0 of CC2543 as output P1DIR |= 0x01; // Toggle P1.0 for(;;) { P1_0 ^= 1; for(i = 0; i < 10000; i++) { asm("NOP"); } } } The code will toggle P1.0 quickly. Add the file to the project by right clicking the project and selecting Add “blinky.c”. You are now ready to compile and download the code to the target! |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |