Browse Source

Merge branch 'editor'

master
AlbertoGV 2 years ago
parent
commit
670de01c21
1 changed files with 13 additions and 8 deletions
  1. +13
    -8
      Guía de usuario MSP430 GCC Toolchain.md

+ 13
- 8
Guía de usuario MSP430 GCC Toolchain.md View File

@ -86,15 +86,15 @@ Ejemplo de código para hacer parpadear un led:
void main(void) void main(void)
{ {
WDTCTL = WDTPW | WDTHOLD; // stop watchdog timer
PM5CTL0 = 0x0000; // disable high impedance mode
P1DIR = 0x01; //set up bit 0 of P1 as output
P1OUT = 0x00; //initialize bit 0 of P1 to 0
WDTCTL = WDTPW | WDTHOLD; // stop watchdog timer
PM5CTL0 = 0x0000; // disable high impedance mode
P1DIR = 0x01; //set up bit 0 of P1 as output
P1OUT = 0x00; //initialize bit 0 of P1 to 0
for(;;){ //loop
for(;;){ //loop
volatile unsigned int i; volatile unsigned int i;
P1OUT ^= 0x01; //toggle bit 0 of P1
//Delay
P1OUT ^= 0x01; //toggle bit 0 of P1
//Delay
for(i=40000; i>0;){ for(i=40000; i>0;){
i--; i--;
__no_operation(); __no_operation();
@ -427,5 +427,10 @@ Instala la libreria libncursesw.so.5 para solucionar el problema mediante el com
sudo apt-get install libncursesw.so.5 sudo apt-get install libncursesw.so.5
``` ```
------
### **Referencia**
<<<<<<< HEAD
[1] Texas Instruments. Msp430-gcc-opensource gcc-open source compiler for msp microcontrollers, 2017.
=======
>>>>>>> parent of c6aec50 (Ordené y corregí algunas cosas del documento en general)

Loading…
Cancel
Save