Jump to content
43oh

calinp

Members
  • Content Count

    46
  • Joined

  • Last visited

  • Days Won

    1

Reputation Activity

  1. Like
    calinp got a reaction from muhammet in [Energia Library] Petit FatFS SD Card Library   
    A small update:
    - all config settings in one file - pffconf.h
    - a soft SPI driver ( shuftIn/shiftOut ) that can be enabled in pffconf.h. It defaults on HW SPI pins, but these can be changed using FatFs.begin(cs_pin, sclk_pin, mosi_pin, miso_pin); . The speed is very low, but it frees 3 pins that can be used as analog inputs or I2C.
    - added a small benchmarking example
     
    Tested on MSP430G2553 and Stellaris Launchpads. A minimal program should work also on MSP430G2452. 
    On fraunchpad the examples compile without errors but I don't have the board to test it.
     
    Calin
     
     
    PFatFs10.zip
    PFatFs_SpeedTest.txt
    PFatFs_SpeedTest430.txt
  2. Like
    calinp reacted to tingo in Nokia 5110 display   
    Very nice - thanks for informing us.
  3. Like
    calinp got a reaction from qwertyu in [Energia Library] Petit FatFS SD Card Library   
    Hello,
     
    This is a port of ChaN Petit FatFS SD library targeted to low RAM microcontrollers and offers a minimal FAT implementation, with limited write support. For more details see http://elm-chan.org/fsw/ff/00index_p.html
     
    A lot of credits goes to the main contributors to this topic http://forum.43oh.com/topic/1427-petitefs-fatfs-sdcard-usci-code/
     
     
    Because this library makes use of the SPI library included in Energia it  works for both MSP430 and Stellaris launchpads.
     
    With MSP430 I noticed some interference with Serial.print so before every call to the fat library I had to add a small delay. On Stellaris board these are not necessary. 
     
     
    Unzip and copy in Energia\hardware\msp430\libraries or Energia\hardware\lm4f\libraries .
     
    [uPDATE] See post #15 http://forum.43oh.com/topic/3209-energia-library-petit-fatfs-sd-card-library/#entry30031
     
    [DOWNLOAD LINK] http://forum.43oh.com/index.php?app=core&module=attach&section=attach&attach_id=3019
  4. Like
    calinp reacted to tonrei in Tiva- Connected Launchpad DSO   
    Tiva- Connected Launchpad DSO
    Here is a beginners version of an Oscilloscope and Network Analyser, using the Connected Launchpad as digitiser and a modified version of the CircuitGear Mini Graphic User Interface of Syscomp Electronic Design Ltd. www.syscompdesign.com.
    Spec’s:  
    1 channel differential @ 4 Msps or 2 channel diff. @ 2 Msps max.
    The 12 bit ADCs sample always at 2Msps, on lower required speeds the signals are oversampled as much as practical for an output of 14 bit unsigned integers. This makes aliasing-filtering easier.
    The timing is entirely done by the ADC-clock.
    The software is made with "Energia version 0101E0012" ; thanks for this "easy to start with" tool.
    and with the wiring_analog.c  from https://github.com/vladn2/Energia/ . (this one does not use interrupts).
    There are many comments in the code to explain the workings.
    There are timing problems while using Energia version 0101E0013 even with the new pde.jar for optimisation.
    With a AD9850  direct digital synthesis (DDS) as sine-wave generator, output frequency resolution of 0.0291 Hz with a 125 MHz reference clock. This is based on: http://forum.stellarisiti.com/topic/558-ad9850-with-energia/
     
     
     
    CircuitGear GUI modification.
    The offset (new in vertical.tcl) and Gnd-shift (in cursors.tcl) is now handled in the GUI (display.tcl), not in hardware. In display.tcl is channel C embedded as product of chan.A and B for power measurement. Change of the vertical settings or the cursors ends in a re-plot of the screen with the old data for further investigation.
    For the trigger-modes and options are buttons used, very handy especially for Single-shot to quickly stop acquisition when a freak signal occurs (the menus are still there). The Single-shot mode now also functions in the scan-mode, so that acquisition stops at the end of the screen.
    While developing, it became necessary to add a ‘disconnect,  item to the hardware menu.
    The Waveform Generator GUI sends its frequency value as one big number to the LaunchPad. Amplitude and offset are not used (yet).
    In the Network Analyser mode the logarithmic frequency settings and the right plot limit are changed and the ‘End Frequency’ is as measurement step added.
    The logarithmic steps are now set by the number of steps per decade.
    To implement these changes, install the GUI from www.syscompdesign.com. Than rename the original tcl-files in the source-directory that must be replaced by the modified ones and copy the modified versions in the source-directory. Also copy the two images (these were necessary to better fit my screen) in the Images-directory.
     
    Future plans:
    Build the analog part.
    Implement amplitude setting on the DDS.
    Implement a Hi-Res-mode by using a longer circular buffer.
     
    Tiva-DSO and GUI modification.zip
    CircuitGear display.zip
  5. Like
    calinp reacted to Rei Vilo in [Energia Library] Petit FatFS SD Card Library   
    Best solution is to use modern collaborative tools and share a repository.

     

    I've created the SD_TM4C repository for SD Library for LaunchPad LM4F / TM4C and pushed my code.

     

    Feel free to contribute and add support for other LaunchPad boards  . 

  6. Like
    calinp reacted to PTB in Stellaris Launchpad - Camera Flash Timer and Measurement Tool   
    Camera Flash Timer and Measurement Tool
     
     
     
    This project is an amalgamation of many other ideas and projects by other brilliant folks plus my own twist on things.
    Hopefully I have given credit to all those whose work I have expanded upon and incorporated.
    Apart from libraries, I have written the majority of the code from scratch implementing what I have learnt from this and other forums.
    Still quite a few bugs and it is probably 80 - 90% complete.
    I did get some perspex laser cut for it, but I didnt have the right software for it and borked the file conversion and received cute little minature versions.
    Will have another shot at that in the near future.
     
    Particular mention goes to the following folks for their posts and/or help.
    Maurice Ribble, Creator of the Camera Axe and Original Multiflash.
    @@RobG , Colour LCD with Touch https://www.tindie.com/products/RobG/color-lcd-boosterpack-touch/ I would be lost without this boosterpack and assistance.
    @@jkabat , http://forum.stellarisiti.com/topic/684-stellaris-fast-analog-reads/ John's Assistance with the Fast Analog reads required was awesome. Thanks!
    @@Rei Vilo, For help on many matters.
    @@calinp, For the porting of PetitFatfs.
    @@bluehash, For the SD card boosterpack. I have pretty much directly copied this circuit into my board.
     
    Thanks guys
     
    Main Components.
     
    RobG's Touchscreen Booster Pack.
    Stellaris Launchpad
    SD Card Socket
    I2C EEPROM
    Flash Sensor
    OptoIsoloators for Flashes
    Indicator LEDs
    Phototransistor
     
    Useage
     
    Takes the original flash signal and triggers up to 8 additonal flashes. The flashes can be either fired instantly or via delayed timings of which there are multiple modes.
     
    - Instant
    - Constant
    - Varies
    - Factor Increasing
    - Factor Decreasing
    - Synchronize
     

     

     

     

     

     
     
    It can also measure T0.1 and T0.5 camera flash durations via another menu.
     

     

     
    For ages I couldn't figure out what the spike was prior to many of the flash measurements. I am thinking it is a prepulse to the main flash which helps ionize the flash prior to main burst.
    If that's what it is, I am pretty stoked I can see it. Just need to modify my calcs routine to ignore it.
     
    http://en.wikipedia.org/wiki/Flashtube
     
    The purpose of measuring the flash lags and durations is an attempt to align flashes with different characteristics so that they are as closely synced as possible which removes ghosting of images.
     
    Jkabats help with fast analog routine has been key to achieving the 1Msps sampling rate.
     
    As each flash is profiled, the full curve data is stored in an I2C EEPROM along with summary details. This is then extracted by the Synchronize routine to set the delays for each flash.
    I have 7 different modes for aligning the flashes timewise. The results don’t differ too much depending on choice of method.
     
    1. Peak (default)
    2. T0.1 Midpoint
    3. T0.1 Centroid of area under curve
    4. T0.5 Midpoint
    5. T0.5 Centroid of area under curve
    6. Full Curve Midpoint
    7. Full Curve Centroid of area under curve
     
    The faster flashes are held back, and they all cross the finish line at the same time.
    The whole flash array inherits the lag of the slowest flash.
     
    All the data from the I2C chip can be written to an SD Card for further analysis on a PC. Here is the data ported to excel.
     

     
    Code
     
    The code is still underway but most things are working.
    This is version 0.26
     
    PTB_Flash_Measurement_Tool.zip
    (The main file is PTB_Iridium.INO . Will need to create folder structure to suit)
     
    Schematic
     
    This is the current schematic but will be updated in the near future to fix some problems.
    Multiflash 3.sch.pdf
     
    Stellaris Launchpad Mods
     
    Remove Resistors R2, R9, R10, R11, R12.
     
    Bugs and Issues
     
    Slowly working through things.
     
    1. Flash Port 3 isn't firing for some reason. I think it used to. I wonder if it is related to issue #2 below.
    2. I ran into strife with my indicator leds. They are Dual Colour red/blue and then I got a better understanding of forward voltage.
    The blue is very close to the operating voltage of 3.3v. I have done arduino thing before this and it was all 5v, so it caught me. (again)
    I am waiting on some lower resistance arrays, but I think this may create other problems to do with how much current the Stellaris can sink.
    http://e2e.ti.com/support/microcontrollers/stellaris_arm/f/471/t/45816.aspx
    Sooooo... I plan to redo the schematic in the near future implementing a darlington array to drive the optos and indicator leds.
    Gotta think that through. It will be my third board revision. Can't keep doing that forever.
    3. I seem to be only able to get it to run with Energia 0009 at the moment. Later versions don't seem to work with touch screen. Deffo my Software issue.
    4. I2C EEPROM Speeds are very slow. There is a lot of data I am writing in there, but I think some better coding on my part will help a lot.
    Luckily that only really affects 2 operations. The rest is zippy enough.
    5. Haven't written code for reading back from SD card into I2C EEPROM Chip.
    6. I seem to have some kind of problem with I2C addressing. I think its an Energia Wire library thing which may have been fixed in later versions.
    I had a 24lc512 but I wanted more space so I dropped in a 24lc1025 which I then found is like 2 different addresses.
    Couldn't write to one bank without writing to the other, so it defeated the purpose. I want more space to save longer curves from more powerful flashes.
    It is currently good enough to deal with common flashes at full power.
    7. I too have the problem of scanning the I2C bus and getting an address found at every address. The I2C Eeprom works as required though.
     
    More as I think of them.....
     
     
    Cheers
     
    PTB
  7. Like
    calinp reacted to danirebollo in SSD1289 TFT trouble (init?)   
    Hello! 
    im trying to connect 3.2" ssd1289 TFT LCD with stellaris. I change successfully pins on high nibble from LCD (DB8-DB15) to different ports on stellaris (stellaris only have one full port: B. others have only a few pins and others share pins with jtag or other functions...), and now my problem is print on screen.
     
    I print horizontally arround large side (320) right up corner is 0,0 , and i can tell point to horizontal start (move to the left):  I can move start point to the left, but not to bottom. Always start at top even when i change start register. 
     
    Has anyone managed to control SSD1289?
     
    when I'm at home i put some code of my library.
     
     
  8. Like
    calinp reacted to bluehash in [Energia Library] Petit FatFS SD Card Library   
    Tutorial is up. Enjoy!
    http://43oh.com/2013/12/interfacing-the-launchpad-to-an-sd-card-a-walkthrough/'>Interfacing An SD-Card To The Launchpad
  9. Like
    calinp reacted to bluehash in [Energia Library] Petit FatFS SD Card Library   
    @@calinp
    Ok.. I tried what you said... and it works!
     
    Tutorial coming up shortly!
  10. Like
    calinp got a reaction from bluehash in [Energia Library] Petit FatFS SD Card Library   
    For writing function to work, the file must be created in advance with a size >0. This library can not resize, delete files or change their attributes.
     
    For lseek to work you shoud keep in mind that writing with petit fatfs can start only at the begining of a sector, so the pointer shoud go to the next sector in case data needs to be written again.
     
    Let's say you write 150 bytes in a file and close it. when the file is opened again for write, lseek shoud have 512 as argument.
    If one wants to write a single byte and uses lseek(151), then writing will start at the beginning of the same sector and will overwrite the already existing 150 bytes because when a file is closed, the remaining bytes in the sector are filled with nulls.
     
    Writing with this library is very restricted but I think it is the only one that can work in less than 512 Bytes of ram. 
  11. Like
    calinp reacted to simpleavr in M-Clock build, M for Minimalist, Multi-mode or Matrix   
    Minimalist Multi-mode Matrix Clock
     

     
    Description
     
    This is a multi-mode clock project based on the msp430g2432. It can be assembled with minimal parts. With limited 8x8 pixels display resolution, this 12 hour clock shows time in 6 different modes. This project is based on a older attiny 2313 project I did a few years ago.
     
    HHMM mode, typical hours plus minutes scrolling digits with colon separator.
     

     
    Seconds mode, shows only seconds.
     

     
    Tix mode (shown below), led matrix is divided into quadrant, the upper quadrants shows the hour in bcd (binary coded decimal) values. they are represented by the number of dots to indicate the digits. the lower quadrants show the minute in bcd. i.e. for 5:34 it shows no dot + 5 dots on the upper half and 3 dots + 4 dots on the lower half.
     

     
    Dice mode (shown below), the led matrix is divided into two set of 'dices'. with the upper pair showing hour from 1 - 12, the lower pair of dice shows minutes in 5 minute increments. i.e. for 5:35 it shows dice value upper 5 + lower 7 (5 hour, 7 x 5 min).
     

     
    Binary (really it's bcd, or binary coded decimal) mode, (shown below) the hour, minute and second digits are show as binary dot on different columns in the led matrix. the columns 0 and 1 (from left) represents the hour digits, column 2 is blanked, columns 3 and 4 represent the minute digits, colum 5 is blanked, columns 6 and 7 represents the second digits.
     

     
    The circuit employs row and column multiplexing to drive the leds, one row at a time, this gives a 12.5% duty cycle when "sets" of leds (8 of them in each of the 8 rows) are turn on briefly. current limiting resistors are eliminated to save breadboard estate and as we are not constantly driving individual leds, they are not going to be damaged.
     
    The control (user interface) is also arranged so that we only use one tactile button for input. the firmware capture long button presses (press and hold) for menu rotation and normal button presses for menu selection.
     
    By migrating this project from an AVR mcu to a msp430 mcu I had made it possible to keep time a lot more accurately. During display (i.e. led on) the project runs at 1Mhz DCO. The msp430 mcu has factory calibrated clock values. When not displaying, this project enters a LPM3 (low-power mode 3) to conserve power. At LPM3 the DCO clock cannot be used and the project switches to use a 32Khz crystal based AClk to keep time.
     
    Features
    Minimal component count, 4 parts.
    Battery operated from 3V to 3.6V.
    Use of watchdog timer to keep time, power-down sleep mode (LPM3) takes uA power.
    32Khz crystal to keep accurate time when sleep.
    Runs 1Mhz DCO calibrated clock when active (displaying time).
    This is a 12H clock, not 24H and has no AM/PM indicator.
    Easter egg application.
    Parts list
    msp430g2432 (or other G series dip 20pin devices w/ 4k+ flash)
    8x8 LED matrix display (red only, this is a 3V project)
    tactile button
    32Khz clock crystal
    2x LR44 button cell or 3V-3.6V other battery source

     
    Application Notes
    Short key press in display mode cycles through HHMM, seconds, tix, dice, binary and sleep modes.
    Long press enters setup mode, subsequent long press rotates thru menu.
    Menu items cycles thru 'Set Clock', 'Dimmer', 'Auto-off'.
    In 'Set Clock' setup mode, short presses increment digit values (hours, minutes) and long press confirms.
    In 'Dimmer' setup mode, short presses cycles through available brightness levels, long press confirms setting.
    In 'Auto-off' setup mode, short presses toggle the auto-off on and off. With auto-off turned on, the clock displays time for 15 seconds and turn itself into LPM3 sleep mode to converse power. With auto-off turned off, display is on continuously.
    When in sleep mode, MCU goes in power down mode, consuming less than 30uA of power, 32Khz crystal w/ watchdog timer is used to keep time. A pin interrupt is enabled to allow for wake up via tactile button. In this mode the main clock is disabled to conserve power.
    Led segment multiplexing includes time delays to compensate for brightness differences for individual rows.
     
    Breadboard Layout
     
     
    the 8x8 led matrix has dot size of 1.9mm and is of common cathode, if you have common anode type, you can change a few lines in the code for adoption. see the following diagram and see if you have the right pin-outs. it appears they are quite common and if you purchase via ebay most suppliers have the same pin-out even if the model number is different.
     



       +=====================================================+
       |  .  .  +-------------------(1)------------(1) .  .  |
       |  .  .  |  .  .  .  o||o (2)------------------+.  .  | (crystal)
       |  .  ./ |  .  . \.  +--+--+--+--+--+--+--+  . |.  .  |
       |  . (+) |  .  .  o C7 C6 R1 C0 R3 C5 C3 R0  . |.  .  | (2xLR44 cell)
       |  .  .\ |  .  . /.  |    b2 b3           |  . |.  .  |
       |  . (+) |        +--+--+--+--+--+--+--+--+--+ |.  .  |
       |     |  |       |G b6 b7  T  R a7 a6 b5 b4 b3||      |
       |     |  |       |                            ||      | (msp430 mcu)
       |     |  |       |+ a0 a1 a2 a3 a4 a5 b0 b1 b2||      |
       |  .  | (1) .  . .+--+--+--+--+--+--+--+--+--+ |.  .  |
       |  .  +----------(+) +--+--+--+--+--+--+--+ (2)+.  .  | (8x8 red led matrix)
       |  .  .  .  .  .  .  R4 R6 C1 C2 R7 C4 R5 R2 .  .  .  |
       |  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  |
       |  .  . (1)-[  ]-(+) .  .  .  .  .  .  .  .  .  .  .  | (tactile button)
       |  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  |
       +=====================================================+


       *note: all (1)s, (2)s and (+) points are electrically connected


    Schematic
     


                                MSP430G2xxx
                             -----------------
              --------------|RESET            |
              | ------------|TEST             |
              | |           |                 |
              | |   ROW5 <--|P2.0         P1.0|--> ROW4 (of LED Matrix)
     /|\      | |   ROW2 <--|P2.1         P1.1|--> ROW6
      |  _|_  | --- ROW1 <--|P2.2         P1.2|--> COL1
      --o   o------ COL0 <--|P2.3         P1.3|--> COL2
        Button      ROW0 <--|P2.4         P1.4|--> ROW7
                    COL3 <--|P2.5         P1.5|--> COL4
          32Khz /-- COL7 <--|P2.6(XIN)    P1.6|--> COL5
        Crystal \-- COL6 <--|P2.7(XOUT)   P1.7|--> ROW3
                            |                 |

    Assembling
    Follow breadboard layout and place two jumper wires on mini breadboard
    Place msp430g2432 mcu
    Place 32Khz crystal
    Place Tactile Button
    Place power source (I am using 2xLR44 w/ magnets as holders)
    Finally place 8x8 led matrix on top of msp430g2432
    /EDIT match clock mode description w/ photos, current build is on G2432, G2452,G2553, etc will also work.
  12. Like
    calinp got a reaction from russcky in [Energia Library] Petit FatFS SD Card Library   
    Hi russcky,
     
    The Petit FatFS library does not support multiple files open. You can find more information on http://elm-chan.org/fsw/ff/00index_p.html .
    Searching with lseek works, but is very slow to do this multiple times.
     
    This library supports a forwarding function that I did not implement (check the examples from the link for an implementation).
     
    Calin
  13. Like
    calinp got a reaction from PTB in [Energia Library] Petit FatFS SD Card Library   
    Hello,
     
    This is a port of ChaN Petit FatFS SD library targeted to low RAM microcontrollers and offers a minimal FAT implementation, with limited write support. For more details see http://elm-chan.org/fsw/ff/00index_p.html
     
    A lot of credits goes to the main contributors to this topic http://forum.43oh.com/topic/1427-petitefs-fatfs-sdcard-usci-code/
     
     
    Because this library makes use of the SPI library included in Energia it  works for both MSP430 and Stellaris launchpads.
     
    With MSP430 I noticed some interference with Serial.print so before every call to the fat library I had to add a small delay. On Stellaris board these are not necessary. 
     
     
    Unzip and copy in Energia\hardware\msp430\libraries or Energia\hardware\lm4f\libraries .
     
    [uPDATE] See post #15 http://forum.43oh.com/topic/3209-energia-library-petit-fatfs-sd-card-library/#entry30031
     
    [DOWNLOAD LINK] http://forum.43oh.com/index.php?app=core&module=attach&section=attach&attach_id=3019
  14. Like
    calinp got a reaction from Arch_ETS in Tachometer. Resolution vs speed issues.   
    Hi,
    I think that in rpm_fun you should get timestamps to compute the time between sparks instead of counting pulses.
    Anither ideea would be to use pulseIn to get the duration ( measure both high and low pulses). This method will do measurements on differen pulses, but as the engine is a slow system compared to the microcontroller, this should not be a problem.
     
    Calin
  15. Like
    calinp got a reaction from igor in eLua for Stellaris Launchpad   
    Hi,
    Actually Chip select pin is on Port A, Pin 3 -  "#define SDC_SSI_FSS GPIO_PIN_3".
    I think I can try your build with Chip Select on pin 6.
     
    Calin
     
     
    At the first run the SD support is working. I can succesfully list the files on the SD Card ! 
    Next i will try to create and edit some files.
     
    The card is connected as I posted earlier, with CS on Port A, Pin 3.
     
     
    Thanks!
  16. Like
    calinp reacted to spirilis in nRF24 Temperature Sensor Bug   
    Well at this point I have 3 of these "bugs" around my house, one on the basement floor / one in the garage / one up in the attic. The most surprising piece of data right now seems to be the garage; it's cooler in there than I'd normally think. Just incredibly muggy courtesy of the mid-atlantic high humidity in the summer.
     
    Sent from my Galaxy Note II with Tapatalk
     
     
  17. Like
    calinp reacted to igor in eLua for Stellaris Launchpad   
    I just updated the Stellaris version of eLua to version 0.9
    Still needs more testing.
     
    Latest build is attached in a zip file.
     
    See the eLua site for instructions on how to use.
     
    Quick version:
    Unzip it.  Flash it to Stellarish Launchpad.
    Open a terminal window to the launchpad, (115200 baud, n, 8, 1)
    Type help for list of commands at the prompt.
    You can type in eLua code, or send it files using xModem.
     
    Let me know if you find errors.
    elua_lualong_ek-lm4f120-2013-07-03.zip
    elua_lualong_ek-lm4f120-2013-08-01.zip
  18. Like
    calinp got a reaction from Rei Vilo in [Energia Library] Stellaris Launchpad FatFs Energia library   
    Hi Rei,
    I have seen some erratic behavior when using SPI0, but I assumed it is because of my wiring and not driving the pins with enough current. The first library I posted used a SPI driver for the SD card taken from the Stelarisware and it worked fine.
    Also I checked the library only on SPI 0 and 2.
     
    Given your detailed analysis on this problem I think it is an initialisation problem that must be addressed to the Energia developers.
     
    Thank you for your effort.
    Calin
  19. Like
    calinp got a reaction from sirri in [Energia Library] Petit FatFS SD Card Library   
    I looked again the picture and there is no need to supply 5V from USB to the SD board.
    Try with FatFs.begin(cs_pin,16);   this will lower the SPI clock 
    Check if your Energia/hardware/msp430/libraries/SPI/utility/usci_spi.cpp  and  Energia/hardware/msp430/cores/msp430/usci_isr_handler.c  files are the same as the ones in github.
     
    Calin
  20. Like
    calinp got a reaction from sirri in [Energia Library] Petit FatFS SD Card Library   
    Hi Sirri,
     
    From the pictures I think you are using an SD adapter that have level shifting so it can interface to 5V microcontrollers (like Arduino).
    This will not work, because the MSP430 is a 3.3V device and the voltage levels from the card will be to low.
    Try to connect the card directly using the first method from http://www.43oh.com/2011/02/five-cheap-breadboard-prototyping-tips-and-tricks-list-2/
    ( this is what I used )
     
    Regards,
    Calin
  21. Like
    calinp got a reaction from sirri in [Energia Library] Petit FatFS SD Card Library   
    A small update:
    - all config settings in one file - pffconf.h
    - a soft SPI driver ( shuftIn/shiftOut ) that can be enabled in pffconf.h. It defaults on HW SPI pins, but these can be changed using FatFs.begin(cs_pin, sclk_pin, mosi_pin, miso_pin); . The speed is very low, but it frees 3 pins that can be used as analog inputs or I2C.
    - added a small benchmarking example
     
    Tested on MSP430G2553 and Stellaris Launchpads. A minimal program should work also on MSP430G2452. 
    On fraunchpad the examples compile without errors but I don't have the board to test it.
     
    Calin
     
     
    PFatFs10.zip
    PFatFs_SpeedTest.txt
    PFatFs_SpeedTest430.txt
  22. Like
    calinp reacted to GG430 in Starry Sky with LEDs   
    This was a present for my daughters first birthday. Actually I wanted to have it ready one year earlier before her real birthday but had some project delay ;-)
    The plate is mounted to her rooms ceiling close to her bed and there is no day going to bed without her switching it on. She had her 4th birthday back in January.
     
    It's a starry sky with 32 LEDs showing 5 signs (Gemini, Cancer, Capricorn, Aries and Virgo). I was only able to share 3 LEDs and that was the minimum I needed. A MSP430F2012 is driving two TLC5940 on a proto board, dimming the LEDs in and out. Actually I planned to etch a PCB but then I stayed with the proto. Three buttons are controlling the different operating modes. Due to the lack of ports I added different resistors to the buttons which I measure with the ADC once triggered by an interrupt to see which one was pressed. This reduces the required port to one for three buttons. The code is in Assembly, guess today I'd write it in C. I added some features over time, like switching all LEDs to full power to have an additional light in the room.
     
    There is a funny story behind the signs for me. I had chosen the signs of my wife, dad, mom, myself and my daughters projected date of birth which was Capricorn. But unfortunately live is sometimes not as predictable as we think and my daughter took another 12 relaxing days with her mom and slipped over being an Aquarius. Since I already had finished the wooden plate I didn't change it anymore. So her sign is the wrong one in the project. I'm looking forward to tell her the story in a couple of years
     
     
     


     


     
    StarrySky.ppt
  23. Like
    calinp got a reaction from energia in [Energia Library] Petit FatFS SD Card Library   
    A small update:
    - all config settings in one file - pffconf.h
    - a soft SPI driver ( shuftIn/shiftOut ) that can be enabled in pffconf.h. It defaults on HW SPI pins, but these can be changed using FatFs.begin(cs_pin, sclk_pin, mosi_pin, miso_pin); . The speed is very low, but it frees 3 pins that can be used as analog inputs or I2C.
    - added a small benchmarking example
     
    Tested on MSP430G2553 and Stellaris Launchpads. A minimal program should work also on MSP430G2452. 
    On fraunchpad the examples compile without errors but I don't have the board to test it.
     
    Calin
     
     
    PFatFs10.zip
    PFatFs_SpeedTest.txt
    PFatFs_SpeedTest430.txt
  24. Like
    calinp got a reaction from bluehash in [Energia Library] Petit FatFS SD Card Library   
    A small update:
    - all config settings in one file - pffconf.h
    - a soft SPI driver ( shuftIn/shiftOut ) that can be enabled in pffconf.h. It defaults on HW SPI pins, but these can be changed using FatFs.begin(cs_pin, sclk_pin, mosi_pin, miso_pin); . The speed is very low, but it frees 3 pins that can be used as analog inputs or I2C.
    - added a small benchmarking example
     
    Tested on MSP430G2553 and Stellaris Launchpads. A minimal program should work also on MSP430G2452. 
    On fraunchpad the examples compile without errors but I don't have the board to test it.
     
    Calin
     
     
    PFatFs10.zip
    PFatFs_SpeedTest.txt
    PFatFs_SpeedTest430.txt
  25. Like
    calinp reacted to Rickta59 in printf?   
    Or you could just override the putchar() c function and then you don't have to use a buffer.
     
    -rick
    extern "C" { int putchar(int c) { Serial.write((uint8_t)c); return c; } } void setup() { Serial.begin(9600); printf("%s", "This is a really long string that would blow out an\n" "an arbitrarily sized buffer on the stack, but this\n" "should work just fine\n" "Lorem Ipsum is simply dummy text of the printing and\n" "typesetting industry. Lorem Ipsum has been the industry's\n" "standard dummy text ever since the 1500s, when an unknown\n" "printer took a galley of type and scrambled it to make a\n" "type specimen book. It has survived not only five centuries,\n" "but also the leap into electronic typesetting, remaining\n" "essentially unchanged. It was popularised in the 1960s with\n" "the release of Letraset sheets containing Lorem Ipsum passages,\n" "and more recently with desktop publishing software like Aldus\n" "PageMaker including versions of Lorem Ipsum.\n\n" ); } static int cnt=0; void loop() { printf("cnt=%-5d hex=0xx\n",cnt,cnt); cnt++; delay(500); }
×
×
  • Create New...