Jump to content
Forum sending old emails Read more... ×


  • Content Count

  • Joined

  • Last visited

  • Days Won


jsolarski last won the day on January 16

jsolarski had the most liked content!

1 Follower

About jsolarski

  • Rank
    Level 3
  • Birthday 03/21/1983

Contact Methods

  • Website URL

Profile Information

  • Gender
    Not Telling
  • Location
    Chicago IL
  • Interests
    lots of stuff, and more stuff
  • Sparkfun
  • Github

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. http://www.ti.com/lit/ug/spruhd4m/spruhd4m.pdf This should get you going
  2. No file system is expected when writing data to the SD card like you are, you have to implement a file system, that's why i pointed to FATFS....basically you need to write to a file to read from a computer. You have a few options on how to get the data. 1) Dump the SD card data using DD or other command that can read block devices, hex editors and file recovery software are places to start. 2) create a function that dumps it to the serial output, and have your computer put it in a file. 3) implement a file system, where you write data to a file on the SD card. im researching some things for you to get you pointed out in the right direction.
  3. so lets start simple, have you tried a different sd card? or tried a different sector? (not all SD cards are equal) have you made sure the card lock switch is in the correct position? (im sure you have but just want to make sure.) are you able or do you know how to use "dd" to see if you actually have written to the sd card? (dd is a command to either write or read raw data from a disk or image.) we want to verify that you are actually writing to the sd card The code looks good, but i dont use RTOS, and dont have a way to test at this time, im sure i could but I dont have time to get it wall setup.
  4. Hi sara, I can only give you limited support, and hopefully point you in the right direction......... Your HW does have SPI, so you should be able to write to SD cards with out issue. Try looking here the only thing I see is you have to change the code to fit your HW, I do not know if SSI is close to USCI or USI. also if you add more info on your setup we maybe able to guide you in the right direction as well.
  5. jsolarski

    Microphone data output

    OK, i did my best with out having the device and while working so it may or may not work, but you should be able to get the idea of what I mean #include <msp430.h> unsigned int voice; volatile unsigned char volt [5]; //JS edits volatile unsigned char raw_adc_data // added global for adc data to serial void init_serial (void); void init_serial (void) { P5SEL |= 0xC0; // 5.6 and 5.7 for TX/RX- UCA1 UCA1CTL1 |= UCSWRST; UCA1CTL1 |= UCSSEL_1; //32768 Hz UCA1BR0 = 03; // Baudrate 9600 UCA1BR1 = 0x00; UCA1MCTL = 0x06; // Modulation Sx=3, Fx= 0 UCA1CTL0 = 0x00; UCA1CTL1 &= ~UCSWRST; // In operation mode } //js edit removed for testing. //void ADC_value (int); //void ADC_value (int ADC_Data) /*{ volatile char x=3; volt [3] = volt [2] = volt [1] = volt [0] = 0x30; while (ADC_Data > 0) { volt [x] = (ADC_Data%10)| 0x30; // Separating unit digit ADC_Data = ADC_Data/10; // rest of the digit than last digit x--; } volt [4] = '\0'; }*/ void Send_Serial (void); void Send_Serial (void) { //js edit removed for testing //volatile char i=0; /*while (volt[i] != '\0') { UCA1TXBUF = volt[i]; while (UCA1STAT & UCBUSY); i++; }*/ UCA1TXBUF = raw_adc_data; while (UCA1STAT & UCBUSY); UCA1TXBUF = 0x0a; while (UCA1STAT & UCBUSY); UCA1TXBUF = 0x0d; while (UCA1STAT & UCBUSY); } int main(void) { P6OUT |= BIT4; // microphone power P6OUT &= ~BIT5; // microphone connected at input channel 5 P6SEL |= BIT5; WDTCTL = WDTPW + WDTHOLD; // Stop WDT /* Initialize the shared reference module */ REFCTL0 |= REFMSTR + REFVSEL_0 + REFON; // Enable internal 1.5V reference /* Initialize ADC12_A */ ADC12CTL0 &= ~ADC12ENC; // Ensure ENC ADC12CTL0 = ADC12ON + ADC12SHT02; // Set sample time ADC12CTL1 = ADC12SHP + ADC12SSEL_3; // Enable sample timer ADC12MCTL0 = ADC12INCH_5; // ADC input ch A5 => MIC init_serial (); while (1) { ADC12CTL0 &= ~ADC12SC; ADC12CTL0 |= ADC12SC + ADC12ENC; while (ADC12CTL1 & ADC12BUSY) __no_operation(); // voice = ADC12MEM0; js edit raw_adc_data = ADC12MEM0; // ADC_value (voice); js edit Send_Serial (); } }
  6. jsolarski

    Microphone data output

    void ADC_value (int ADC_Data) { volatile char x=3; volt [3] = volt [2] = volt [1] = volt [0] = 0x30; while (ADC_Data > 0) { volt [x] = (ADC_Data%10)| 0x30; // Separating unit digit ADC_Data = ADC_Data/10; // rest of the digit than last digit x--; } volt [4] = '\0'; } I' thinking this is your issue... what happens if you pass straight ADC values to your serial output? does it show the same thing?
  7. Yes, Pins will affect ADC values, for internal temp. My suggestion would do pull downs, on those ports connected to the ADC. when you do pull ups, there may be some leakage into the ADC that could skew the readings.
  8. jsolarski

    Error.h : No such file or directory

    @energia can we add a note to this sketch that it requires TI-RTOS? or do you have a work around for this?
  9. jsolarski

    Error.h : No such file or directory

    you need to download TI-RTOS to get the corresponding files. I do not use energia, so I would not know where or how to load it other then downloading it from http://www.ti.com/tool/TI-RTOS-MCU
  10. jsolarski

    Error.h : No such file or directory

    in Button. h on mine it is missing the same file with the same error..... looking into it further......
  11. jsolarski

    Converting MPS430 assembler code to Energia

    Energia may not have all the options implemented, you are probably going to have to setup the timer manually and hope it doesnt conflict with what energia sets up. what kind of timer interrupt are you looking for? WDT? TIMER0A? periodic or one time? and are you planning to put the CPU to sleep? I can help to get a basic code setup for you.
  12. jsolarski

    I2C issue with tiva C

    It looks like you gave good info on the git post, be patient the maintainer usually replies pretty quick, but it is the holidays
  13. jsolarski

    Converting MPS430 assembler code to Energia

    even if you are no good at C, you can start reading and understanding it, it will help in all your projects. it will give you an understanding of what the code is actually doing. just start with learning bitwise operators. |,^,~,&...etc you can do fancy things like toggle a pin on and off with few lines of code. I do agree not to use CHANGE, and just look for rising or falling edges.
  14. jsolarski

    Is Energia a portable installation on Windows?

    I can run the IDE with out it installing anything on a locked down machine..... I have not tried to compile or run debuggers since they are not installed on this machine.
  15. jsolarski

    Converting MPS430 assembler code to Energia

    the code for the attach interrupt -- the magic that makes it work....lol void attachInterrupt(uint8_t interruptNum, void (*userFunc)(void), int mode) { uint8_t bit = digitalPinToBitMask(interruptNum); uint8_t port = digitalPinToPort(interruptNum); if ((port == NOT_A_PIN) || !((mode == FALLING) || (mode == RISING) || (mode == CHANGE))) return; __dint(); switch(port) { case P1: if(mode != CHANGE) { P1IES = mode ? P1IES | bit : P1IES & ~bit; } else { intChangeVectP1 |= bit; P1IES = (P1IN & bit) ? (P1IES | bit) : (P1IES & ~bit); } P1IFG &= ~bit; intFuncP1[bit_pos(bit)] = userFunc; P1IE |= bit; break;