Browse Source

Archivos

master
GrisC 2 years ago
parent
commit
8076aa4a12
5 changed files with 38 additions and 0 deletions
  1. BIN
      1.jpeg
  2. BIN
      2.jpeg
  3. +20
    -0
      Ejemplo.c
  4. +18
    -0
      Makefile
  5. +0
    -0
      README.md

BIN
1.jpeg View File

Before After
Width: 453  |  Height: 342  |  Size: 25 KiB

BIN
2.jpeg View File

Before After
Width: 455  |  Height: 345  |  Size: 24 KiB

+ 20
- 0
Ejemplo.c View File

@ -0,0 +1,20 @@
#include <msp430fr6989.h>
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
for(;;){ //loop
volatile unsigned int i;
P1OUT ^= 0x01; //toggle bit 0 of P1
//Delay
for(i=40000; i>0;){
i--;
__no_operation();
}
}
}

+ 18
- 0
Makefile View File

@ -0,0 +1,18 @@
OBJECTS=Ejemplo.o
GCC_DIR = /home/griscampos/msp430-gcc/bin
SUPPORT_FILE_DIRECTORY = /home/griscampos/msp430-gcc/include
DEVICE = msp430fr6989
CC = $(GCC_DIR)/msp430-elf-gcc
GDB = $(GCC_DIR)/msp430-elf-gdb
CFLAGS = -I $(SUPPORT_FILE_DIRECTORY) -mmcu=$(DEVICE) -O2 -g
LFLAGS = -L $(SUPPORT_FILE_DIRECTORY) -T $(DEVICE).ld
all: ${OBJECTS}
$(CC) $(CFLAGS) $(LFLAGS) $? -o $(DEVICE).out
debug: all
$(GDB) $(DEVICE).out

+ 0
- 0
README.md View File


Loading…
Cancel
Save