
kylej1050
-
Content Count
114 -
Joined
-
Last visited
Reputation Activity
-
kylej1050 got a reaction from bluehash in New Noritake VFD samples (choice of 114x16 or 16x2)
Here is a video of it on the screen. I apologize for the quality. Tried to use the slowest camera I had to keep the refreshing from showing.
http://youtu.be/mBSmEdL-Gww
-
kylej1050 got a reaction from bluehash in IQmathLib for CCS
Got this in an email and thought it was pretty neat. Gives the G series a bit more math oomph!
http://www.ti.com/tool/msp430-iqmathlib
-
kylej1050 reacted to energia in Building low power into Energia
I just finished the first version of low power implementation. 2 new functions were introduced: sleep(uint32_t milliseconds) and sleepSeconds(uint32_t seconds).
sleep() has a resolution of 2 ms while sleepSeconds() has a resolution of 250ms. So calling sleep(1) will actually get you 2 ms. calling sleepSeconds(1) will get you 1.25 seconds. sleep() will go to LPM3 2ms at the time while sleepSeconds() will go to LPM3 250ms at the time. For this reason sleepSeconds() is a lot more efficient. sleep() depending on the MSP430 will get you between 15uA for the FR5969 and 25uA for the G/F5-Series. sleepSecond on the other hand will get you between 700nA for the FR5969 and 2uA for the G/F5-Series. If you would like to give this a try then replace the flowing files in your Energia installation. Make sure that you create a backup of your original files first.
Replace: hardware/msp430/cores/msp430/Energia.h with https://raw.githubusercontent.com/energia/Energia/master/hardware/msp430/cores/msp430/Energia.h
Replace: hardware/msp430/cores/msp430/wiring.c with https://raw.githubusercontent.com/energia/Energia/master/hardware/msp430/cores/msp430/wiring.c Below is an example Sketch for the G-Series that spends most of it's time in LPM3 and briefly flashes the green LED every x seconds/milliseconds. /* * To reduce power consumption all unused pins should be set as output low. * Setting pins as output can potentiall cause conflicsts. * Therefor this below functions set all pins to input pulldown as a good alternative. */ void setInputLow(uint8_t port, uint8_t pins) { volatile uint8_t *out; volatile uint8_t *ren; /* Get the output register */ out = portOutputRegister(port); /* Get the internal resistor pull up/down register */ ren = portRenRegister(port); /* If the port is not a port then return */ if(out == NOT_A_PORT || ren == NOT_A_PORT) return; /* Enable the internal pull up/down resistors */ *ren |= pins; /* Clear output register bits to select pull down */ *out &= ~pins; } void setup() { /* IMPORTANT: Set all unused pins to input low to reduce power consumption. * The XTAL bits, P2.6/7 on the G-series and P5.4/5 on the F5529 and PJ4/5 on the FR5969 * should NOT be set as input low since this significantly increases current draw and * the crystal will fail to start. * The example below shows the pin settings for the G2553. * P1.6 is the Green LED and P2.6/7 are the the Crystal pins. */ setInputLow(1, BIT0 + BIT1 + BIT2 + BIT3 + BIT4 + BIT5 + BIT7); setInputLow(2, BIT0 + BIT1 + BIT2 + BIT3 + BIT4 + BIT5); // setInputLow(3, BIT0 + BIT1 + BIT2 + BIT3 + BIT4 + BIT5 + BIT6 + BIT7); // setInputLow(4, BIT0 + BIT1 + BIT2 + BIT3 + BIT4 + BIT5 + BIT6 + BIT7); // setInputLow(5, BIT0 + BIT1 + BIT2 + BIT3 + BIT4 + BIT5 + BIT6 + BIT7); // setInputLow(6, BIT0 + BIT1 + BIT2 + BIT3 + BIT4 + BIT5 + BIT6 + BIT7); // setInputLow(7, BIT0 + BIT1 + BIT2 + BIT3 + BIT4 + BIT5 + BIT6 + BIT7); // setInputLow(8, BIT0 + BIT1 + BIT2 + BIT3 + BIT4 + BIT5 + BIT6 + BIT7); /* Set the GREEN_LED as OUTPUT */ pinMode(GREEN_LED, OUTPUT); } void loop() { /* Briefly flash the RED LED every x seconds */ digitalWrite(GREEN_LED, HIGH); // turn the LED on (HIGH is the voltage level) delay(10); digitalWrite(GREEN_LED, LOW); // turn the LED off by making the voltage LOW delay(10); /* Sleep for 2 seconds. Around 1.5 uA of current */ sleepSeconds(2); /* Sleep for 500 ms. Around 25 uA current */ // sleep(500); } -
kylej1050 reacted to greeeg in New Noritake VFD samples (choice of 114x16 or 16x2)
I just recieved a 144x16 as a POTM prize.
Even though they're a graphical type, there is a decent amount of overhead required to just to set/clear single pixels. It appears as if displaying text is more what they're designed for.
That being said, they seem to have some custom commands to display bitmaps, which seem pretty powerful.
-
kylej1050 got a reaction from spirilis in New Noritake VFD samples (choice of 114x16 or 16x2)
I'm really excited about this one, really wanting to play with their small series of displays!
-
kylej1050 got a reaction from meanpc in How do I get from Arduino to MSP430?
Energia is a great stepping stone if you already know Arduino, it'll allow you to get used to the hardware without having to learn new software. Then you can work on the software aspect (c and c++) for power and speed optimizations later.
Sent from my HTC Arrive using Board Express
-
kylej1050 reacted to alsenin in $4.99 Stellaris (Cortex-M4) LaunchPad
Hi there!
Good news. $4.99 Stellaris (Cortex-M4) LaunchPad coming soon!
http://www.ti.com/ww/en/launchpad_site/ ... -launchpad
-
-
kylej1050 got a reaction from bluehash in Sometimes a little analog looks sweet.
This is the pinout for the TIL393-8 bubble display for cubeberg.
Not sure what operating specs I ran it on but i used an ICM7218B to drive it last time I had them hooked up and it only supplies 7.5mA. I wouldn't drive it harder than 10mA and that's assuming it's multiplexed. These are 70s leds so they won't play nice with lots of current.
Here is a video of it.
-
kylej1050 got a reaction from cubeberg in Sometimes a little analog looks sweet.
This is the pinout for the TIL393-8 bubble display for cubeberg.
Not sure what operating specs I ran it on but i used an ICM7218B to drive it last time I had them hooked up and it only supplies 7.5mA. I wouldn't drive it harder than 10mA and that's assuming it's multiplexed. These are 70s leds so they won't play nice with lots of current.
Here is a video of it.
-
-
kylej1050 got a reaction from viet_dtvt_bkdn in LED lights up gradually
Put an ~120 ohm resistor inline with the LED. Running it straight off the pin like that will take out either the pin or the led. Not sure which one would lose the battle. Depends on the led quality.
-
kylej1050 got a reaction from deeroh in Hate mail : Need your input
I would say to let images be downloadable and files require registration. Sometimes someone is just looking for info about a project and not being able to see the schematics or photos could be irritating to some. Especially when you aren't sure if it's a quality site. (I know this is how I feel sometimes)
Allowing images could also lead to linking from other forums and possibly more traffic.
Sent from my HTC Arrive using Board Express
-
kylej1050 reacted to oPossum in Clock cycles per operation
CCS v4 has a cycle counter that can be used while debugging. Set a breakpoint at the beginning and end of time critical code. Clear the cycle count at the first breakpoint and read the cycle count when the second breakpoint is hit.
You can also create a disassembly with cycle counts using naken430asm.
this code:
timer calc = ((current counter value - last counter value)*10000 / 9362285)* user selected constant;
can be optimized by premulitiplying 10000 and user selected constant
timer calc = (long)(current counter value - last counter value) * scaled_user_constant / 9362285L;
-
kylej1050 got a reaction from RobG in Hate mail : Need your input
I would say to let images be downloadable and files require registration. Sometimes someone is just looking for info about a project and not being able to see the schematics or photos could be irritating to some. Especially when you aren't sure if it's a quality site. (I know this is how I feel sometimes)
Allowing images could also lead to linking from other forums and possibly more traffic.
Sent from my HTC Arrive using Board Express
-
kylej1050 got a reaction from pine in Relay switch - Live or Neutral to connect?
Always.
But NEVER trust that the wire that's supposed to be neutral really is. Especially in a home environment, it's likely that the wires to the plug could be reversed. Same goes for ground. If there is an appliance leaking to ground and the outside connection isn't great it could have potential above ground in the house.
I've got an All-American 5 radio I use every weekend for late-night coast to coast and there are just some plugs in the house you can't trust the metal chassis on because it's connected to neutral directly and it's live on some plugs.
http://en.wikipedia.org/wiki/All_American_Five
-
kylej1050 got a reaction from kenemon in ac wall adapters, huh?
Was the supply maintaining 5v when plugged in? It may have been sagging.
-
kylej1050 got a reaction from dzsombor in Clock speed problem.
You're using a 2231?
According to my rough calculations, delay for the 2231 needs changed to 1875 as opposed to 1000 for it to work properly. It seemed to maintain sync with my watch at that delay so that's what I've used.
This will be corrected in the next version btw.
-
kylej1050 got a reaction from dzsombor in Clock speed problem.
Yes, it's only the 1MHz chip that has the delay issue. The 16MHz chips have the correct delay.
-
kylej1050 reacted to RobG in TLC5940 examples
TLC5940 code examples.
1. UART to TLC
2. Chasing light, useful for your next Knight Rider project
#include #define SCLK_PIN BIT5 #define MOSI_PIN BIT7 #define GSCLK_PIN BIT4 #define BLANK_PIN BIT0 #define XLAT_PIN BIT2 typedef unsigned char u_char; u_char leds[16] = { 0, }; void updateTLC(); void main(void) { WDTCTL = WDTPW + WDTHOLD; // disable WDT BCSCTL1 = CALBC1_16MHZ; // 16MHz clock DCOCTL = CALDCO_16MHZ; P1OUT &= ~(BLANK_PIN + XLAT_PIN); P1DIR |= BLANK_PIN + XLAT_PIN; P1DIR |= GSCLK_PIN; // port 1.4 configured as SMCLK out P1SEL |= GSCLK_PIN; // setup timer CCR0 = 0xFFF; TACTL = TASSEL_2 + MC_1 + ID_0; // SMCLK, up mode, 1:1 CCTL0 = CCIE; // CCR0 interrupt enabled // setup UCB0 P1SEL |= SCLK_PIN + MOSI_PIN; P1SEL2 |= SCLK_PIN + MOSI_PIN; UCB0CTL0 = UCCKPH + UCMSB + UCMST + UCSYNC; // 3-pin, 8-bit SPI master UCB0CTL1 |= UCSSEL_2; // SMCLK UCB0BR0 |= 0x01; // 1:1 UCB0BR1 = 0; UCB0CTL1 &= ~UCSWRST; // clear SW updateTLC(); P1OUT |= XLAT_PIN; P1OUT &= ~XLAT_PIN; _bis_SR_register(GIE); leds[0] = 0x0F; u_char counter = 0; u_char direction = 0; while (1) { _delay_cycles(500000); if (direction) { counter--; leds[counter] = 0x0F; leds[counter + 1] = 0; if (counter == 0) direction = 0; } else { counter++; leds[counter] = 0x0F; leds[counter - 1] = 0; if (counter == 15) direction = 1; } } } void updateTLC() { u_char ledCounter = 8; while (ledCounter-- > 0) { UCB0TXBUF = leds[(ledCounter << 1) + 1] << 4; while (!(IFG2 & UCB0TXIFG)) ; // TX buffer ready? UCB0TXBUF = leds[ledCounter << 1]; while (!(IFG2 & UCB0TXIFG)) ; // TX buffer ready? UCB0TXBUF = 0; while (!(IFG2 & UCB0TXIFG)) ; // TX buffer ready? } } #pragma vector = TIMER0_A0_VECTOR __interrupt void Timer_A0(void) { P1OUT |= BLANK_PIN; P1OUT |= XLAT_PIN; P1OUT &= ~XLAT_PIN; P1OUT &= ~BLANK_PIN; updateTLC(); } -
kylej1050 got a reaction from pillum in Controlling TLC5940 with MSP430G2553 doesn't work
I did this with the 2553 installed in a launchpad with 5940 in breadboard.
Do you get them to light at all? I have the 5940 with all leds burning bright right now using your code. I edited the code and it does change the way the leds behave. Your GSCLK is very slow however as the leds that don't have full brightness blink instead of dimming. If you add "BCSCTL1 = CALBC1_16MHZ;" under your watchdog code it will dim though.
Your code keeps the processor very busy. I would recommend using a timer to output your clock signal while the MSP goes about other business. Doesn't matter if you pre-program a routine but if you want the MSP to do anything else while running this chip there is no time for it.
Do you have bypass capacitors on the breadboard?
-
kylej1050 got a reaction from cde in Controlling TLC5940 with MSP430G2553 doesn't work
I did this with the 2553 installed in a launchpad with 5940 in breadboard.
Do you get them to light at all? I have the 5940 with all leds burning bright right now using your code. I edited the code and it does change the way the leds behave. Your GSCLK is very slow however as the leds that don't have full brightness blink instead of dimming. If you add "BCSCTL1 = CALBC1_16MHZ;" under your watchdog code it will dim though.
Your code keeps the processor very busy. I would recommend using a timer to output your clock signal while the MSP goes about other business. Doesn't matter if you pre-program a routine but if you want the MSP to do anything else while running this chip there is no time for it.
Do you have bypass capacitors on the breadboard?
-
kylej1050 got a reaction from RobG in Controlling TLC5940 with MSP430G2553 doesn't work
Reset on the 2553, pin 10 in the second schematic, which has nothing connected to it but needs a pull-up resistor to function.
-
kylej1050 got a reaction from RobG in Sometimes a little analog looks sweet.
I was going to build a Geiger counter using some Russian tubes I got on the bay and at first was going to go use a little Nokia display until I ran across these at the surplus store. They have like 40 of them at $5 each. Not bad for a cool looking gauge! They're brand spanking new.
They also have these little bubble displays for $2 each that I think look neat as well.
I like the old stuff. Found this at the bottom of a box of old tubes.
-
kylej1050 reacted to energia in Swamp Cooler Automatic Purge Pump
The Watchdog runs in interval timer mode rather than watchdog mode and is (ab)used to do the sys tick like function for delay(), micros(), mills(). Unfortunately watchdog and interval mode are mutually exclusive. Sys tick like functionality would have to be moved to a timer to free up the Watchdog. Timers are a scares resource and hence I chose to use the watchdog for the sys tick function.