Custom Search

Category Archives: Uncategorized

Your Comments are welcome!!

0
Filed under Uncategorized

I wanted to get some opinions on my site, I want to know what I can change or  improve.

I know my writing isn’t always the best but I try. If you have any suggestions to improve my writing, or technical abilities or you just don’t like me. please speak up!!  ……Trolls welcome! lol

MSP430 interrupt driven PWM

4
Filed under Uncategorized

this is the code for a PWM, using the WDT as an interval timer.

//options for interval timer
/* WDT is clocked by fSMCLK (assumed 1MHz)
WDT_MDLY_32 (WDTPW+WDTTMSEL+WDTCNTCL)  32ms interval (default)
WDT_MDLY_8 (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS0)  8ms ”
WDT_MDLY_0_5 (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS1)  0.5ms ”
WDT_MDLY_0_064 (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS1+WDTIS0)  0.064ms ”
WDT is clocked by fACLK (assumed 32KHz)
WDT_ADLY_1000 (WDTPW+WDTTMSEL+WDTCNTCL+WDTSSEL)  1000ms ”
WDT_ADLY_250 (WDTPW+WDTTMSEL+WDTCNTCL+WDTSSEL+WDTIS0)  250ms ”
WDT_ADLY_16   16ms ”
WDT_ADLY_1_9   1.9ms ”
interval x PERIOD = period interval    .064ms x 200 = 12.8ms or 78.125hz */
#include <msp430x20x2.h>
#include <signal.h> //add for interrupt
#define PERIOD 200  //defines frequency
volatile  int timer = 0; //counts how many interrupts have been called
//resets when it counts to PERIOD
volatile  int duty_cycle = 0;// max = PERIOD - 1 and min = 1
void main(void)
{
WDTCTL = WDT_MDLY_0_064; //interval setting
P1DIR |= BIT0;
P1OUT |= BIT0;
IE1 |= WDTIE;
eint(); //enable interrupt
}//end main
interrupt(WDT_VECTOR) watchdog_timer(void)
{
++timer;
if (timer == PERIOD) { timer = 0; P1OUT |= BIT0;  }
if (timer == duty_cycle ) { P1OUT ^= BIT0; }
}//end interrupt

a quick demo using my rgb light

sorry for the sound, i forgot to turn off my TV lol

Invintory time!!!

3
Filed under Uncategorized
Tagged as

While i work and try to finish a few small projects that i have started but haven’t posted about, I will be doing a small inventory of all my parts…….I have boxes and bags, and parts almost everywhere and i dont really know what i have any more. When i am finished, I may be giving away parts as long as shipping is reasonable. This wont cut to much into my programming and writing posts, i do that during work (ssshhhh!).

I also want to thank everyone who visits my site. It means alot :)

Justin

TI samples came in today

1
Filed under Uncategorized

ADS7841-
12-Bit, 4-Channel Analog-to-Digital Converter
ADS7813-
16-Bit Sampling Analog-To-Digital Converter
…TLC5940-
16-Channel LED Driver w/EEprom
TLC556-
Dual LinCMOS(TM) Timer
TRS232E-
Dual RS-232 Driver/Receiver With IEC61000-4-2 Protection
MSP430F2013-
16-bit Ultra-Low-Power Microcontroller, 2kB Flash

Update: I’m slackin on posting stuff

0
Filed under Uncategorized
Tagged as ,

Sry I will post my latest project soon, getting pics ready and working on it after work every morning, schematics, formulas and the all the fun things….dont worry i promise by Thursday There will be new stuff up!!!

Justin