Skip to content

Instantly share code, notes, and snippets.

View kizzlebot's full-sized avatar

James Choi kizzlebot

View GitHub Profile
@kizzlebot
kizzlebot / 0_reuse_code.js
Created February 16, 2014 04:27
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
#include <msp430fg4618.h>
#include <msp430.h>
#include "LCD_Ctrl.h"
#include "stdio.h"
#define GREEN BIT2
#include <msp430fg4618.h>
#include <msp430.h>
#include "LCD_Ctrl.h"
#include "stdio.h"
// Lab 4 - Part A1
#define GREEN BIT2
#include <msp430fg4618.h>
#include <msp430.h>
#include "LCD_Ctrl.h"
#include "stdio.h"
// Lab 4 - Part A2
// Not so sure
#include <msp430fg4618.h>
#include <msp430.h>
#include "Init_Interrupts.h"
int Init_Interrupts(unsigned int timerStop) {
// Clock Set up
CCTL0 = CCIE; // Set up Timer+Clock
TACTL = DEFAULT_CLOCK + DEFAULT_MODE; // [timerA -> ACLK][MODE: UP]
TACCR0 = timerStop; // TACCR0 is the upper limit of the timer = 32768
#include <msp430fg4618.h>
#include <msp430.h>
#include "Init_Interrupts.h"
int Init_Interrupts(unsigned int timerStop) {
// Clock Set up
CCTL0 = CCIE; // Set up Timer+Clock
TACTL = DEFAULT_CLOCK + DEFAULT_MODE; // [timerA -> ACLK][MODE: UP]
TACCR0 = timerStop; // TACCR0 is the upper limit of the timer = 32768
@kizzlebot
kizzlebot / lab5_1.asm
Last active August 29, 2015 13:58
addition working, Need LCD output
.cdecls C,LIST,"msp430g2553.h"
.text
.retain
.retainrefs
.sect ".sysmem"
arg .space 0x0000
arg1 .space 0x0000
arg2 .space 0x0000
; James choi
; Lab #2 Part 2.2D - Print the SW1 and SW2 statuses to Hyperterminal
;---------------------------------------------------------------------------------------------------------
; Enable C-Headers
;---------------------------------------------------------------------------------------------------------
.cdecls C,LIST,"msp430fg4618.h"
;---------------------------------------------------------------------------------------------------------
; Assembler Directives Setup
#include "msp430fg4618.h"
#include "stdio.h"
//---------------------------------------------------------------
// CONTAINS C-PROGRAMMING PARTS 2-5
//---------------------------------------------------------------
void Init_UART(void);
void OUTA_UART(unsigned char A);
unsigned char INCHAR_UART(void);
int add(void);
.cdecls C,LIST,"msp430g2553.h"
.text
.retain
.retainrefs
.sect ".sysmem"
arg .space 0x0000
arg1 .space 0x0000
arg2 .space 0x0000