RobG 1,892 Posted August 17, 2011 Share Posted August 17, 2011 My board and MSGEQ7 chip in action. Three 5x7 matrix displays (15x7) are connected to my 595 expander board. MSGEQ7 does all the hard work here, nothing fancy, no FFT. tedl57, cubeberg, larsie and 5 others 8 Quote Link to post Share on other sites
bluehash 1,581 Posted August 26, 2011 Share Posted August 26, 2011 Hi Rob, is there code for this. I was planning on putting this on the Blog. Quote Link to post Share on other sites
RobG 1,892 Posted August 26, 2011 Author Share Posted August 26, 2011 Give me couple of days and I will post details. Quote Link to post Share on other sites
cde 334 Posted August 26, 2011 Share Posted August 26, 2011 Bastards at EMI flagged your video. It can't play embedded. Quote Link to post Share on other sites
zeke 693 Posted August 27, 2011 Share Posted August 27, 2011 That's cool Man! Blinken Lights are just cool! BTW, the video sounds great to me. Quote Link to post Share on other sites
RobG 1,892 Posted August 27, 2011 Author Share Posted August 27, 2011 Bastards at EMI flagged your video. It can't play embedded. Where are you located? UK? Quote Link to post Share on other sites
cde 334 Posted August 27, 2011 Share Posted August 27, 2011 Bastards at EMI flagged your video. It can't play embedded. Where are you located? UK? Even Worse. New Jersey. Its just restricted based on site. I can see it on youtube, but not embedded. The music choosen got it flagged. RobG 1 Quote Link to post Share on other sites
RobG 1,892 Posted August 29, 2011 Author Share Posted August 29, 2011 Here's the code: #include "msp430g2553.h" #define DATAPIN BIT6 #define CLOCKPIN BIT5 #define LATCHPIN BIT0 #define EQ_DC_IN_PIN BIT4 // P1.4 #define EQ_RESET_PIN BIT6 // P2.6 #define EQ_STROBE_PIN BIT7 // P2.7 void setUp(); unsigned char timerCounter = 0; unsigned char column = 0; unsigned char txData = 0; unsigned char txCounter = 0; unsigned char eqCounter = 0; unsigned char eqCtrl = 0; unsigned const char columnSelector[8] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 }; unsigned int data[8] = {0,0,0,0,0,0,0,0}; void main(void) { setUp(); __bis_SR_register(GIE); // enable global while(1) { // main loop column = (timerCounter >> 4) & 0x07; txData = columnSelector[column]; txCounter = 0; while(txCounter < 8) { (txData & BIT7) ? (P1OUT |= DATAPIN) : (P1OUT &= ~DATAPIN); txData <<= 1; P1OUT |= CLOCKPIN; P1OUT &= ~CLOCKPIN; txCounter++; } txData = data[column]; txCounter = 16; while(txCounter > 0) { (txCounter <= txData)? (P1OUT |= DATAPIN) : (P1OUT &= ~DATAPIN); P1OUT |= CLOCKPIN; P1OUT &= ~CLOCKPIN; txCounter--; } P1OUT &= ~LATCHPIN; // Latch data P1OUT |= LATCHPIN; __bis_SR_register(LPM0_bits); // go to sleep and wait for the timer } } #pragma vector = TIMER1_A0_VECTOR __interrupt void Timer1_A0 (void) { eqCtrl = (eqCounter >> 2) & 0x07; if(eqCtrl == 0) { if(eqCounter == 0) { P2OUT |= EQ_RESET_PIN; P2OUT &= ~EQ_RESET_PIN; eqCounter += 4; } } else if((eqCounter & 0x03) == 3) { ADC10CTL0 |= ENC + ADC10SC; } else if(eqCounter & 0x01) { P2OUT |= EQ_STROBE_PIN; } else if(eqCounter & 0x02) { P2OUT &= ~EQ_STROBE_PIN; } eqCounter++; timerCounter++; if((timerCounter & 0xF) == 0) { __bic_SR_register_on_exit(LPM0_bits); } } // ADC10 interrupt service routine #pragma vector=ADC10_VECTOR __interrupt void ADC10_ISR(void) { data[eqCtrl-1] = (ADC10MEM >> 6) & 0x0F; } void setUp() { WDTCTL = WDTPW + WDTHOLD; // disable WDT BCSCTL1 = CALBC1_8MHZ; // 8MHz clock DCOCTL = CALDCO_8MHZ; P1OUT |= LATCHPIN; P1DIR |= LATCHPIN + CLOCKPIN + DATAPIN; P2SEL &= ~(BIT6|BIT7); // port 2 all out P2OUT = 0; P2DIR = 0xFF; TA1CCR0 = 576; // 576/72us TA1CTL = TASSEL_2 + MC_1; // SMCLK, upmode TA1CCTL0 = CCIE; ADC10CTL1 = INCH_4; ADC10CTL0 = ADC10SHT_2 + ADC10ON + ADC10IE; } zborgerd, bluehash and lmagicz 3 Quote Link to post Share on other sites
bluehash 1,581 Posted August 29, 2011 Share Posted August 29, 2011 Thanks a ton! Quote Link to post Share on other sites
bcunje 0 Posted March 7, 2012 Share Posted March 7, 2012 from what i understand, most msp430s have a 10bit ADC, which means the input values would vary anywhere from 0-1023 (1024 values)... not sure if there are 14 or even 16 channel eq chips, but do you think it would be effective to interpolate additional "frequencies" into the 7 channels you get from the chip? example would be 1st freq = 430, 2nd freq = 887, (430+887)/2 would equal 658. that could be an interpolated value between the 1st and 2nd frequencies, right? that way you could have 7 true values with 6 interpolated values, giving you a total of 13 frequencies to represent. thoughts? i'm new to the whole msp thing and it's tough to do all the stuff i want to when midterms are going on X( thanks in advance for any responses Quote Link to post Share on other sites
RobG 1,892 Posted March 7, 2012 Author Share Posted March 7, 2012 from what i understand, most msp430s have a 10bit ADC, which means the input values would vary anywhere from 0-1023 (1024 values) Yes, I am dividing 10 bit value by 64 to get 4 bit value. ... not sure if there are 14 or even 16 channel eq chips, but do you think it would be effective to interpolate additional "frequencies" into the 7 channels you get from the chip?example would be 1st freq = 430, 2nd freq = 887, (430+887)/2 would equal 658. that could be an interpolated value between the 1st and 2nd frequencies, right? that way you could have 7 true values with 6 interpolated values, giving you a total of 13 frequencies to represent. thoughts? i'm new to the whole msp thing and it's tough to do all the stuff i want to when midterms are going on X This is pretty much what I am doing in my 10 ch light controller, but instead of interpolating 2 consecutive channels, I am mixing them up, for example ch1 and ch4, ch2 and ch7. This way I get more varied results. Quote Link to post Share on other sites
cubeberg 540 Posted March 7, 2012 Share Posted March 7, 2012 Is Sparkfun the only place to get this thing? Other than a lot of DIY projects, google doesn't turn up much else on the chip. Quote Link to post Share on other sites
RobG 1,892 Posted March 7, 2012 Author Share Posted March 7, 2012 I got mine from eBay, 3 for $6 if I remember correctly. IgnorsHor and cubeberg 2 Quote Link to post Share on other sites
thanhtran 10 Posted May 9, 2012 Share Posted May 9, 2012 I scan through the posts but didn't see any schematic. Is there one? This looks awesome. I would like to duplicate the project . Now combine this project with this project: viewtopic.php?f=9&t=2114 we would have some thing really big I guess :shock: -Thanh Quote Link to post Share on other sites
RobG 1,892 Posted May 9, 2012 Author Share Posted May 9, 2012 Use the schematic from the datasheet. 3 wires from EQ are: DC Out -> P1.4, RESET -> P2.6, and STROBE -> P2.7. The other board is just a bunch of shift registers, so you do not need it. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.