Jump to content

Search the Community

Showing results for tags 'SD card'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News
    • Announcements
    • Suggestions
    • New users say Hi!
  • Spotlight!
    • Sponsor Spotlight
    • Sponsor Giveaways
  • Energia
    • Energia - MSP
    • Energia - TivaC/CC3XXX
    • Energia - C2000
    • Energia Libraries
  • MSP Technical Forums
    • General
    • Compilers and IDEs
    • Development Kits
    • Programmers and Debuggers
    • Code vault
    • Projects
    • Booster Packs
    • Energia
  • Tiva-C, Hercules, CCXXXX ARM Technical Forums
    • General
    • SensorTag
    • Tiva-C, Hercules, CC3XXX Launchpad Booster Packs
    • Code Vault
    • Projects
    • Compilers and IDEs
    • Development Kits and Custom Boards
  • Beagle ARM Cortex A8 Technical Forums
    • General
    • Code Snippets and Scripts
    • Cases, Capes and Plugin Boards
    • Projects
  • General Electronics Forum
    • General Electronics
    • Other Microcontrollers
  • Connect
    • Embedded Systems/Test Equipment Deals
    • Buy, Trade and Sell
    • The 43oh Store
    • Community Projects
    • Fireside Chat
  • C2000 Technical Forums
    • General
    • Development Kits
    • Code Vault
    • Projects
    • BoosterPacks

Calendars

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Location


Interests


Sparkfun


Github

Found 12 results

  1. I was developing a program for the EXP430FR5994LP in June 2018, using version 1.0.3 of the Energia IDE, and I'm pretty sure I was successfully able to read/write an SD card. I recently upgraded my installation to the latest version, 1.0.5, and now when I try and compile the same program I get the error: SD.h: No such file or directory referring to the line: #include <SD.h> Has the SD card support been removed from the Energia core, or am I remembering incorrectly?
  2. I have a tm4c129 board. I have installed updates form the board manager for the TIVA C so now I can upload the default examples form Energia. 1. Problem arises when I try to add custom libraries. What is the correct method to add a library? 2. I can find only MSP430 folder at location E:\..\energia-1.6.10E18\hardware\energia , I suppose all boards installed should show up in the hardware library. 3. I have included the library which I am trying to compile Error: WARNING: Category '' in library SD is not valid. Setting to 'Uncategorized' Missing 'maintainer' from library in C:\Users\Admin\Documents\Energia\libraries\SD Error compiling for board LaunchPad (Tiva C) w/ tm4c129 (120MHz). sd-logger-source.zip
  3. Hi frineds, Issue : I am data logging into my 1 gb sd card using given code. In my serial terminal window it shows that the data is being written in the sd card, but when i take it out from microcontroller interface and put it in the computer it shows nothing buy empty file (log.txt). Well i know one thing that can be causing this issue that is the log.txt file shows read only in my linux mint environment but still i can write anything in that file. I have attached a screen recording and screen shot file of the issue down below. Please help me... Thank you in advance... Code : #include <pfatfs.h> #include <pffconf.h> /*----------------------------------------------------------------------*/ /* Petit FatFs sample project for generic uC (C)ChaN, 2010 */ /*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------- Ported to Energia by calinp Copy the file LOG.txt from this file's location to the root of the SD-Card. 12/21/2013 Modified by bluehash(43oh) to log temperature data from the MSP430G2553 internal temperature sensor and log it to a file on the SD-Card References: http://forum.43oh.com/topic/3209-energia-library-petit-fatfs-sd-card-library/ */ #include "SPI.h" #include "pfatfs.h" #define cs_pin P2_3 // chip select pin #define read_buffer 128 // size (in bytes) of read buffer #define LOG_DELAY 5000 // 5000ms -> 5sec unsigned short int bw, br;//, i; char buffer[read_buffer]; int rc; //DIR dir; /* Directory object */ FILINFO fno; /* File information object */ uint32_t ui32_ReadTemp = 0; uint8_t StringLength = 0; char buf[30]; uint32_t counter = 0; uint32_t AccStringLength = 0; void setup() { pinMode(PUSH2, INPUT_PULLUP); Serial.begin(9600); // initialize the serial terminal analogReference(INTERNAL1V5); analogRead(TEMPSENSOR); // first reading usually wrong FatFs.begin(cs_pin); // initialize FatFS library calls Serial.print("\n\n\n MSP430 Temperature Logger \n\r"); Serial.println("Press S2 button to start..."); while(digitalRead(PUSH2)==1){} delay(100); while(digitalRead(PUSH2)==0){} } /* Stop with dying message */ void die ( int pff_err ) { Serial.println(); Serial.print("Failed with rc="); Serial.print(pff_err,DEC); for (;;) ; } void printDec(uint32_t ui) { Serial.print(ui/10, DEC); Serial.print("."); Serial.print(ui%10, DEC); } /*-----------------------------------------------------------------------*/ /* Program Main */ /*-----------------------------------------------------------------------*/ void loop() { #if 0 Serial.println(); Serial.println("Press button to start..."); while(digitalRead(PUSH2)==1){} delay(100); while(digitalRead(PUSH2)==0){} #endif ui32_ReadTemp = ((uint32_t)analogRead(TEMPSENSOR)*27069 - 18169625) *10 >> 16; #if DEBUG Serial.println(); Serial.println("Opening log file to write temperature(LOG.txt)."); delay(100); #endif rc = FatFs.open("LOG.TXT"); if (rc) die(rc); delay(100); bw=0; ui32_ReadTemp = ((uint32_t)analogRead(TEMPSENSOR)*27069 - 18169625) *10 >> 16; sprintf( buf, "%lu Current temperature is %lu.%lu\r\n", counter, ui32_ReadTemp/10, ui32_ReadTemp%10 ); counter++; StringLength = strlen(buf); Serial.println(buf); #if DEBUG Serial.print(StringLength, DEC); Serial.println(); Serial.print(AccStringLength, DEC); #endif rc = FatFs.lseek( AccStringLength ); if (rc) die(rc); AccStringLength = AccStringLength + 512; rc = FatFs.write(buf, StringLength,&bw); if (rc) die(rc); rc = FatFs.write(0, 0, &bw); //Finalize write if (rc) die(rc); rc = FatFs.close(); //Close file if (rc) die(rc); #if READ delay(100); Serial.println(); Serial.println("Read Temp data from the log file (LOG.txt)."); delay(100); rc = FatFs.open("LOG.TXT"); if (rc) die(rc); delay(100); for (;;) { rc = FatFs.read(buffer, sizeof(buffer), &br); /* Read a chunk of file */ if (rc || !br) break; /* Error or end of file */ for (uint16_t i = 0; i < br; i++) /* Type the data */ Serial.print(buffer); delay(100); } if (rc) die(rc); #endif // Log delay delay(LOG_DELAY); } Screencast_2017-05-27_15:45:33.mp4
  4. Hello, I am using example code of energia Pfatfs library named "PFatFsfileTest". This program reads "T_READ.txt" file from sd card properly. But It can't write string "Hello world" 10 times to the file "T_WRITE.txt" into sd card. Instead, it just writes only "H". I am posting the original code of file below: /*----------------------------------------------------------------------*/ /* Petit FatFs sample project for generic uC (C)ChaN, 2010 */ /*----------------------------------------------------------------------*/ /* ported to Energia */ /* copy the two files t_read.txt and t_write.txt from the example folder in the root of the sd card*/ #include "SPI.h" #include "pfatfs.h" #define cs_pin 10 // chip select pin #define read_buffer 128 // size (in bytes) of read buffer unsigned short int bw, br;//, i; char buffer[read_buffer]; int rc; DIR dir; /* Directory object */ FILINFO fno; /* File information object */ void setup() { pinMode(PUSH2, INPUT_PULLUP); Serial.begin(9600); // initialize the serial terminal FatFs.begin(cs_pin); // initialize FatFS library calls } void die ( /* Stop with dying message */ int pff_err /* FatFs return value */ ) { Serial.println();Serial.print("Failed with rc=");Serial.print(pff_err,DEC); for (; ; } /*-----------------------------------------------------------------------*/ /* Program Main */ /*-----------------------------------------------------------------------*/ void loop() { Serial.println(); Serial.println("Press button to start..."); while(digitalRead(PUSH2)==1){} delay(100); while(digitalRead(PUSH2)==0){} Serial.println(); Serial.println("Open a test file (t_read.txt)."); delay(100); rc = FatFs.open("T_READ.TXT"); if (rc) die(rc); Serial.println(); Serial.println("Type the file content."); delay(100); for (; { rc = FatFs.read(buffer, sizeof(buffer), &br); /* Read a chunk of file */ if (rc || !br) break; /* Error or end of file */ for (uint16_t i = 0; i < br; i++) /* Type the data */ Serial.print(buffer[i]); delay(100); } if (rc) die(rc); Serial.println(); Serial.println("Open a file to write (t_write.txt)."); delay(100); rc = FatFs.open("T_WRITE.TXT"); if (rc) die(rc); Serial.println(); Serial.println("Write a text data. (10 x Hello world!)"); delay(100); bw=0; for (uint16_t i=0;i<10;i++) { rc = FatFs.write("Hello world!\r\n", 14, &bw); if (rc || !bw) break; } if (rc) die(rc); rc = FatFs.write(0, 0, &bw); //Finalize write if (rc) die(rc); delay(100); Serial.println(); Serial.println("Verify the write process (t_write.txt)."); delay(100); rc = FatFs.open("T_WRITE.TXT"); if (rc) die(rc); Serial.println(); Serial.println("Type the file content."); delay(100); for (; { rc = FatFs.read(buffer, sizeof(buffer), &br); /* Read a chunk of file */ if (rc || !br) break; /* Error or end of file */ for (uint16_t i = 0; i < br; i++) /* Type the data */ Serial.print(buffer[i]); delay(100); } if (rc) die(rc); Serial.println(); Serial.println("Open root directory."); delay(100); rc = FatFs.opendir(&dir, ""); if (rc) die(rc); Serial.println(); Serial.println("Directory listing..."); delay(100); for (; { rc = FatFs.readdir(&dir, &fno); /* Read a directory item */ if (rc || !fno.fname[0]) break; /* Error or end of dir */ if (fno.fattrib & AM_DIR) {Serial.print("<dir>\t"); Serial.println(fno.fname);delay(100);} else {Serial.print(fno.fsize);Serial.print("\t"); Serial.println(fno.fname);delay(100);} } if (rc) die(rc); Serial.println(); Serial.print("Test completed."); //for (; ; } and i am also posting my terminal output below: Press button to start... Open a test file (t_read.txt). Type the file content. abc Open a file to write (t_write.txt). Write a text data. (10 x Hello world!) Verify the write process (t_write.txt). Type the file content. H Open root directory. Directory listing... 3 T_READ.TXT 3858759679 m 3842012416 N 1409286144 EWTEX~1T.XT Test completed. Press button to start... Plz tell me the solution as soon as possible.
  5. Hello, I am working on a project in which we are using the MSP4305969 to measure temperatures and write data to an SD card. The datalogger is in a remote location, so the system needs to conserve enough power to log for a full year. In order to do this we are logging only every 15 minutes and powering everything down to a sleep mode between measurements. We use a transistor as a switch to take power away from the line of temperature sensors while the board is sleeping. That all works fine, my issue is with the SD card reader. We are using the "slot socket" for arduino https://www.amazon.com/Card-Reader-Module-Socket-Arduino/dp/B008B52QQC and the Petit FatFS library for writing to the card. http://elm-chan.org/fsw/ff/00index_p.html When the SD card reader is wired directly to the board the system works fine and it writes exactly how I want it to. However, it draws too much power. I tried wiring the SD card reader through the transistor so that it will have its power taken away when the board is asleep. This creates an issue in writing to the card. It seems as if the SD card reader needs some startup initialization time before it can properly write. I have also tried having the logger pause between waking up and writing, that didn't help either. If anyone has any advice it would be greatly appreciated.
  6. Hello everyone, I'm basically trying to port over Arduino's SD card library (which utilizes SPI communication) to Energia, and am starting by testing whether I am able to properly initialize the SD card or not. First, I made sure that the Arduino library worked on an AT Mega 2560 and SD card that I have (it did). I then moved on to porting the library for Energia. I changed the pin mapping and the SPI settings to work for the F5529 and so far I can prove with a logic analyzer that the SD initialization function commands the CS, SCLK, MISO, and MOSI SPI lines in the exact same manner for the MSP430 as for the Atmel, byte for byte. Basically, the information coming in to and out of each mircrocontroller is exactly the same so I know that all the SD card information is there for me However, the problem is that the information does not seems to be received by the MSP430 in the same manner as the Atmel and causes the initialization to fail. I think the roots of this issue involve differences between the way the Atmel device DataloggerArduino.zip DataloggerEnergia.zip
  7. Hello, I have used petit FatFs library in my project and it is working great but only problem is It can not create new file it only can modify already created file. But in my project I need to create many files on runtime. where can I ger FatFs SD Host library which I can use with energia. Thanks in advance
  8. Hi, I had interface MSP430F5529 launchpad with FatFS Sd card. I was trying to store value from ADC into SD card and I found that I cannot store the value on SD Card, unless I do "sprintf" or equivalent printf of the data, only then I was able to store the value on SD card. However, sprintf is expensive command and takes more cycle then ADC output i.e some of the data is lost from ADC in doing sprintf. Is there a better alternative than sprintf or something like if I store raw value and later post process it? Any help will be highly appreciated. Thanks
  9. Hello, I have a question regarding communication between my Tiva C EK-TM4C123GXL lauchpad and a generic SD Card breakout board. Using: Energia 0101E0013 Windows 8.1 SD Library (SD_TM4C) 4 GB FujiFilm SD card I CAN get the ReadWrite demo program in the SD library to work sucessfully by wiring everything up according to the 1-page pinout diagram that came with my board for the SPI bus. Hardware wiring (SD breakout --> Launchpad): SDCS --> J2.9 / PA3 / 12 MOSI --> J2.6 / PB7 / 15 SCK --> J1.7 / PB4 / 7 MISO --> J2.7 / PB6 / 14 And then I change the ReadWrite code so that it looks like this: void setup() { ... ... ... pinMode(12, OUTPUT); pinMode(12, LOW); if (!SD.begin(12)) { Serial.println("initialization failed!"); return; } Serial.println("initialization done."); ... ... ... } ...and everything works just fine. Here's where the problem comes in. I need to change the pins I'm using for the SD card because I'm going to use the Sensor Hub BoosterPack which uses (at least) J2.6 - J2.7 for I2C communication with the sensors. As far as my understanding goes, that means I need to find a different SPI bus for the SD card because I can't switch modes or devices easily. I have tried wiring up to pins J3.3 - J3.6 and changing my code to this... void setup() { ... ... ... pinMode(24, OUTPUT); pinMode(24, LOW); if (!SD.begin(24, SPI_HALF_SPEED, 3)) { Serial.println("initialization failed!"); return; } Serial.println("initialization done."); ... ... ... } ... but the SD card never initializes correctly. I'm obviously missing something and/or not understanding this SP_TM4C library correctly. Any help would be amazing. Thank you!
  10. madvoid

    FatFS on FR5969?

    Hi All, I'm attempting to get an SD card working with the MSP430FR5969 (launchpad) and FatFS but I'm having a difficult time. Two questions: 1. Is it possible to get FatFS working with the MSP430? When I did a search of these forums I mostly saw PetitFat being used with MSP430s. Ultimately, PetitFat would be okay but I would prefer FatFS. 2. Has anyone gotten either PetitFat or FatFS working with the MSP430FR5969? If so, would you be willing to share your code or knowledge regarding it? Thank you in advance for any help, Nipun
  11. Good afternoon, I'm doing a project and I want to write the data read from my analog input on an SD card. I made the mounting of the SD as shown in this link: http://www.instructables.com/id/Cheap-DIY-SD-card-breadboard-socket/ Did the links in the Stellaris SD following this scheme: http://www.frank-zhao.com/pics/sdcardconnections.jpg Where my MISO of SD card connected to MISO (0) of the Stellaris, SD MOSI to MOSI (0) of the Stellaris, SD in SCK (0), fed it with 3.3 V, also connected to GND and CS from SD to my Pin 14, which was determined in the CS program (cs_pin). My question is if my links are correct and how should I proceed with programming. I am beginning in C++ and I do not understand how to make this data transfer, be storing my readings in a variable and I want to write this in a .txt on my SD card, but how? Can someone show me a simple code to do this? I have already tried to run FatFs and PetitFatFs but I did not get success. At Speed Test With FatFs my Serial print "Failed with rc=3", what is it? Regards, Amauri.
  12. is there any library available for reading and writing to the SD card ?
×
×
  • Create New...