Browse Source

Agregué la referencia

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

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

@ -76,15 +76,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();
@ -353,5 +353,7 @@ 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**
[1] Texas Instruments. Msp430-gcc-opensource gcc-open source compiler for msp microcontrollers, 2017.

Loading…
Cancel
Save