|
@ -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,10 +427,14 @@ 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 |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
<<<<<<< HEAD |
|
|
### **Referencia** |
|
|
### **Referencia** |
|
|
|
|
|
|
|
|
<<<<<<< HEAD |
|
|
<<<<<<< HEAD |
|
|
[1] Texas Instruments. Msp430-gcc-opensource gcc-open source compiler for msp microcontrollers, 2017. |
|
|
[1] Texas Instruments. Msp430-gcc-opensource gcc-open source compiler for msp microcontrollers, 2017. |
|
|
|
|
|
======= |
|
|
|
|
|
------ |
|
|
|
|
|
>>>>>>> ae78620e48dc821fc33b729ff6f00058750ec868 |
|
|
|
|
|
|
|
|
======= |
|
|
======= |
|
|
>>>>>>> parent of c6aec50 (Ordené y corregí algunas cosas del documento en general) |
|
|
>>>>>>> parent of c6aec50 (Ordené y corregí algunas cosas del documento en general) |