Jump to content

LiviuM

Members
  • Content Count

    91
  • Joined

  • Last visited

  • Days Won

    13

Reputation Activity

  1. Like
    LiviuM got a reaction from energia in Sd card interface with msp430   
    You have the PFatFs library files twice in the Energia's searching path, once in the library/PFatFs folder and once in the sketch folder.
  2. Like
    LiviuM reacted to NurseBob in Energia Hybrid Code   
    First, an in-depth answer to your request is above my pay grade.  That said...
    Energia (Arduino) targets an audience of non-programmers, as you're well aware. Students have fundamentally different needs & requirements.
    Further, regarding OO, a couple of decades back I overheard this brief exchange between a junior and senior engineer: 
    Question - I thought OO was supposed to make everything transparent?
    Answer - Transparent to the user, opaque to the programmer.
    OO is a complex world. So is Nursing, which is what I teach.  There are parallels in that both require a substantial level of "background" information and understanding.  In Nursing, it's a basis in biology, physiology, chemistry, biochemistry, pathophysiology, bacteriology, psychology, anatomy, and more. With OO, there are the basic concepts of "Is" and "Has," which have a "fractal" relationship to their final implementations, the deeper you go, the deeper you can go... I find one of the main challenges with OO design is figuring out where to stop diving down.
    So, how to accomplish your goal? getting students (I assume at the very early stages of entry level) on board with enough background and intrinsic knowledge so that they can start moving forward exploring the more creative aspects of software applications and implementations.
    I suspect that your choices are:
    1) Write your own example code.  Time consuming, to say the least. 
    2) Use the existing tools and code, which entail their own levels of complexity and obfuscation.
    For my own edification I have pursued the second route, followed by attempting the first as I try to implement what I THINK I may have learned.
    So, for example:
    1) Start with an Energia implementation of Blink the LED.
    2) Import the Energia project in to CCS, which will allow stepping through the code at varying levels of detail, first the loop(), then start looking at how the device is configured and the LED toggled.
    3) Use the TI Blink example C code for the device to see a raw C implementation based on delay cycles. (This is also easily "ported" to an IAR kickstart version).
    4) Look at an interrupt-based Blink application, introduces timers, ISRs and event-driven programming.  (Either CCS or IAR).
    5) For a not-really-OO implementation, use the driverlib from TI.
    I doubt the above accomplishes what you want, but an old adage applies here: If it was easy, anyone could do it...
    Best,
    Bob
  3. Like
    LiviuM got a reaction from Rei Vilo in I2C on TM4c1294 doesn't work   
    LE I'm almost "thrilled" by the amount of details people asking for help is giving. We all have crystal bowls at home. 
  4. Like
    LiviuM got a reaction from DrLou in TM4C129 Connected Launchpad SPI Working?   
    Hi,
    it seems, the Arduino's SPI library has an SPISettings class and Energia's SPI library not. Some older version of the mfr522 library (version=1.1.8, for example) don't use the SPISettings class and compiles for TivaC.
     
    class SPISettings { public: SPISettings(uint32_t clock, uint8_t bitOrder, uint8_t dataMode) { if (__builtin_constant_p(clock)) { init_AlwaysInline(clock, bitOrder, dataMode); } else { init_MightInline(clock, bitOrder, dataMode); } } SPISettings() { init_AlwaysInline(4000000, MSBFIRST, SPI_MODE0); } private: void init_MightInline(uint32_t clock, uint8_t bitOrder, uint8_t dataMode) { init_AlwaysInline(clock, bitOrder, dataMode); } void init_AlwaysInline(uint32_t clock, uint8_t bitOrder, uint8_t dataMode) __attribute__((__always_inline__)) { // Clock settings are defined as follows. Note that this shows SPI2X ...  
  5. Like
    LiviuM reacted to NurseBob in Taking a Class on MSP430s   
    @makiyang614
    Glad to see your level of excitement.
    I've used the F2013 extensively, and have also worked with the FG4618. You won't find launchpads version for either of these devices, though you can find the eZ430-F2013, which preceeded the launchpads as an inexpensive introductory development tool.
    The FG4618 was/is intended to be a one-stop LCD driver chip, with multiple peripherals to allow interaction with the "real world."  The F2013 has significantly less capability, but it does feature a 16-bit SigmaDelta ADC (you'll find some inexpensive IR motion detector projects built around this chip).
    I agree with @Rei Vilo  regarding the F5529 launchpad - it's very versatile, and includes a built-in USB capability.
    I suspect the first major difference you'll see between the Arduino and the '430 is the interrupt-driven approach used to attain very low power requirements. (Oh, almost forgot, the '430 is NOT 5V tolerant... - 3.3V)  Traditional programming approach is the devices are normally "asleep" and wake in response to either timer events or external inputs. You'll find many, many code examples where main() code appears to stop at a low power mode entry point with no further main->executable code, nor a return statement.  Others will feature a while(true) "forever" loop, but which also halts at a low power mode statement, and only executes subsequent statement in response to an interrupt event.  FWIW, the LP line is inexpensive, very capable, and Energia allows an entry point for programming. As you progress you may find yourself moving to more traditional, programmer-oriented tools such as the IAR, CCS and GCC compilers, assemblers, and related linkers.
    This is a good forum is a good place to seek answers, as is https://e2e.ti.com/
    Have fun!
    Bob
     
  6. Like
    LiviuM got a reaction from hemangjoshi37a in [Energia Library] Petit FatFS SD Card Library   
    Have you read the answer @Rickta59 gave you on your (other) thread?
    I mean the part:
     
  7. Like
    LiviuM got a reaction from hemangjoshi37a in SD card not writing any data from microcontroller.   
    Have you tried to write something in the file in Linux? In the movie you are just showing us the file is empty.
  8. Like
    LiviuM got a reaction from hemangjoshi37a in [Energia Library] Petit FatFS SD Card Library   
    Have you read the first post in the topic?
    Is your card maybe hard locked? May you in Linux/Windows delete the file/create a new file on the card?
  9. Like
    LiviuM got a reaction from hemangjoshi37a in I2C - MSP430 to MSP430 problems   
    Hi @@brelliott18,
     
    There are some known problems with i2c on 2553 Launchpads, mentioned in various posts over this forum.
    One of them is mentioned in http://forum.43oh.com/topic/2641-i2c-lcd/page-2#entry75927; in this post is also a link to a solution http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/529036/1924562#1924562
     
    Have you already seen this posts? Have you tried the solutions presented in them?
     
    Regards,
    Liviu
  10. Like
    LiviuM got a reaction from hemangjoshi37a in I2C - MSP430 to MSP430 problems   
    In the post I've linked above the solution was to replace the twi.c & twi_sw.c with new ones, found in the e2e forum. Have you also replaced them?
  11. Like
    LiviuM got a reaction from hemangjoshi37a in What is your Backup Process?   
    Hi,
    for the projects I need to access from multiple places (and needing some privacy) I've configured a small git server and put gogit/gogs *) on top of it.
    Because the core is git, I can use it from command line and gogit gives me the possibility to use it in a way similar to github and (the reason I use it) allows me to define "virtual users" - I can allow other people to access the private repositories without sharing my (main) credentials.
    I have luck with a good hosting offering all needed tools.
    Cheers,
    Liviu
    *) I suppose any "interface" will do the same, I've used gogs because I found a tutorial (in German) about the installation on my server.
  12. Like
    LiviuM got a reaction from hemangjoshi37a in Uploading failed   
    Wrong com-port choose?
  13. Like
    LiviuM got a reaction from hemangjoshi37a in Uploading failed   
    As long you receive "can't open port" messages, I see two possibilities:
    - wrong port
    - bad hardware.
  14. Like
    LiviuM got a reaction from hemangjoshi37a in Msp430FR6989 external LCD   
    Have you tried with the last version of the library, mentioned on the https://hmario.home.xs4all.nl/arduino/LiquidCrystal_I2C/?
     
  15. Like
    LiviuM got a reaction from hemangjoshi37a in [Energia Library] Petit FatFS SD Card Library   
    Hi,
    Glad to hear it's working for you.
    Since the changed library seems to work (I've also updated the example and replaced the library in the post above), maybe Calin or a moderator can update the download on the first post of the topic.
     
    Liviu
  16. Like
    LiviuM got a reaction from hemangjoshi37a in [Energia Library] Petit FatFS SD Card Library   
    Try to locate (I suppose even Macs have a search program ) the PFatFs directory and delete it. Unzip and put the content of the changed library in place of it.
  17. Like
    LiviuM got a reaction from hemangjoshi37a in [Energia Library] Petit FatFS SD Card Library   
    I've changed the DIR with FSDIR in the PFatFs library; I'm attaching the changed library here. Just replace the one on your PC with the attached one.
    On my PC I've put it in ../energia-1.6.10E18/libraries/PFatFs/
    You should probably change your sketches too.
     
    Regards,
    Liviu
     
    EDIT: updated the library (fixed the examples too).
    PFatFs.zip
  18. Like
    LiviuM got a reaction from hemangjoshi37a in [Energia Library] Petit FatFS SD Card Library   
    Hi,
     
    fount it.
    It seems, the DIR definition in energia-1.6.10E18/hardware/tools/msp430/msp430/include/msp430f5529.h

    /* USBCTL Control Bits */ #define DIR (0x0001) /* USB - Data Response Bit */ conflicts with the DIR in the energia-1.6.10E18/libraries/PFatFs/utility/pff.h:
    /* Directory object structure */ typedef struct { WORD index; /* Current read/write index number */ BYTE* fn; /* Pointer to the SFN (in/out) {file[8],ext[3],status[1]} */ CLUST sclust; /* Table start cluster (0:Static table) */ CLUST clust; /* Current cluster */ DWORD sect; /* Current sector */ } DIR; No idea where it will be better to change to remove the conflict, but probably in the PFatFs. 
    Regards,
    Liviu
  19. Like
    LiviuM got a reaction from hemangjoshi37a in [Energia Library] Petit FatFS SD Card Library   
    Hi,
     
    it seems the file energia-1.6.10E18/hardware/tools/msp430/msp430/include/msp430f5529.h has a problem in the USB definition part. I don't know exactly what for a problem, but I was able to compile the above mentioned sketch after commenting out the USB part in msp430f5529.h (between rows ~3430 and ~4227).
    Maybe it helps you.
     
    Regards,
    Liviu
  20. Like
    LiviuM got a reaction from hemangjoshi37a in [Energia Library] Petit FatFS SD Card Library   
    Hi,
    which board are you using?
    I've tested now the "PFatFsFileTest" (library) example and it compiles for the launchpads installed by default by Energia (+TivaC), except MSP-EXP430G5529LP.
     
    Regards,
    Liviu
  21. Like
    LiviuM got a reaction from hemangjoshi37a in [Energia Library] Petit FatFS SD Card Library   
    Hi Spineless,
    I think you should install it as a library.
     
    Liviu
  22. Like
    LiviuM got a reaction from hemangjoshi37a in [Energia Library] Petit FatFS SD Card Library   
    MISO should be connected with MISO, MOSI with MOSI, not crossed.
    MISO means Master In Slave Out, and MOSI means Master Out Slave In. Master & slave are always the same, no crossing is needed.
  23. Like
    LiviuM got a reaction from hemangjoshi37a in [Energia Library] Petit FatFS SD Card Library   
    Hi,
    nice to see that making the connection properly bring it to work. Carefully reading the replies you receive may even accelerate the success.
    For your last problem - writing without writing - maybe you should open the file in the correct mode. In this case the mode should be FA_WRITE.
    Try to replace
    with
    rc = FatFs.open("T_WRITE.TXT", FA_WRITE); or
    rc = FatFs.open("T_WRITE.TXT", FA_WRITE | FA_READ); for read & write access.
     
  24. Like
    LiviuM got a reaction from hemangjoshi37a in [Energia Library] Petit FatFS SD Card Library   
    LE I've read the examples coming with PetitFS and they aren't using the mode specifier neither.
    No idea why it doesn't work for you.
  25. Like
    LiviuM got a reaction from hemangjoshi37a in [Energia Library] Petit FatFS SD Card Library   
    Yes, I've seen, I've read the wrong documentation. Should work without mode qualifiers.
×
×
  • Create New...