Jump to content

CsCrazy

Members
  • Content Count

    15
  • Joined

  • Last visited


Reputation Activity

  1. Like
    CsCrazy got a reaction from bluehash in LCD and Touch booster pack   
    Hi!
     
    I have made some changes to the LCD-button boosterpack in order to get this display to function with MSP430G2452 using USI.
     
    I thought to share this with you guys, someone might find this helpful.
     
    I made some changes to the original source code (lcd.c / lcd.h) because the hardware is a bit different when NOT using MSP430G2553. One noticeable change is that MOSI pin is not P1.7 as it would be in MSP430G2553. When using MSP430G2452, MOSI-pin is P1.6. I don't know why TI has done this (other than to confuse the customers ).
     
    I have attached the schematics and the source code at the end of this reply. Oh, and I used the V2 board with buttons, not touch. But the USI-functional part should be the same whether to use touch or button... Someone with touch-board could verify this? Or perhaps someone would send me an touch-display for me to do it
     
    Anyways, thanks and c ya!
    Sitronix_LCD_ST7579.zip

  2. Like
    CsCrazy reacted to Rickta59 in PetiteFS FATfs SDCard USCI code   
    OK, yet another version of the code. What is special about it?
     
    o Compiles with both msp430-gcc and CCS 5.5 ( at least that is what i tried )
    o Doesn't use any interrupts or timers
    o Uses Hardware USCI UART instead of softserial
    o Changed back to the slightly modified tinyprintf to make is smaller and happy on msp430-gcc
    o Moved data structures into the global space to make it easier to see how the different compile options affect the ram usage.
    o Removed all warning (aside from the CCS power saver whining stuff )
    o Input routine echos as you type, handles backspace editing, and limits input to buffer size
    o fd command (hex dump) can be repeated by pressing enter after the first time.
    o More explicit help in serial console.
    o Uses P2.0 as CS (chip select active low)
    o Optional bitbang spi implementation you might try on smaller chips ( I've tried on g2553 not other chips )
     
    -rick
     
    [sdcard_monitor.zip - archived CCS project. For msp430-gcc use, just unzip and use instructions in main.c ]
    sdcard_monitor.zip
  3. Like
    CsCrazy got a reaction from bluehash in PetiteFS FATfs SDCard USCI code   
    I helped myself here and got the write function working.
     
    You have to make an empty file, or use any kind of file actually that's large enough so that writed bytes are actually written in the SD card. This is because of the limitations with the PetitFS library. The PetitFS can't make files any bigger, so there must be a "dummy" -file in the directory or in the cards root for writes to work.
     
    This is actually documented in the web site: http://elm-chan.org/fsw/ff/pf/write.html
     
    So maybe next time i'll read the f***ing manual instead of crying for help :DD
     
    So summa summarum, here's the steps i got it working:
    1) Format SD-card to FAT
    2) Create file which has some data in it. File can be txt-file for example. How you create the file is your proplem, but there are tools available. If requested, i can send my program which i wrote to make any size file i want, you have to install it though because it's written in C# and uses .NET.
    3) Plug the card in the MSP430 (i know you can't really "plug" it in there but you know what i mean)
    4) Write functions will now work for the created file
    5) Be happy, take a cup of coffee or a beer.
     
    I hope this helps someone.
  4. Like
    CsCrazy got a reaction from bluehash in MSP430 Launchpad RTTTL-player   
    Hi all!
     
    Yesterday I finished with my little project, which was to play ring-tones in rtttl-format (Ring-Tone Text Transfer Language) with MSP430G2231. I thought that some of you might be interested about the project and about the code.
     
    Code is "built" from arduino sketch which involves Tone Library and the sketch acts as a interpreter for the rtttl "code", but also the code is partly made of 'msp430 LaunchPad Music' made by Bob Somers. So this is a kind of a ported code.
     
    Here's how it works. Main part of the rtttl-player (as the CCS project is named) is the play_rtttl(*song) function, which reads the song in RTTTL-format. After the function has decoded each note, the note's frequency is selected from the lookup table and it's length is calculated. These two values (note-freqyency in timer ticks, note-length in ms) are then forwarded to PlaySingleTone(...)-function, which sets up the timer and a delay which they together produce a notable sound from the speaker.
     
    Speaker might be any low-power speaker (since MSP430G2231 doesn't have much kick to drive larger speakers) or a piezo-speaker, as in my case i used a piezo-speaker. Speaker can be connected to any of the pins in mcu, since timer A causes only interrupt when capture/compare register value is detected. Inside the interrupt the port pin is toggled.
     
    You can see or preferrably hear how this little bug plays a MacGyver theme, here's a link to my youtube video: 
     
    So with the msp430g2231 chip you can play about 45 sec long song (of course it depends on the song and it's tone lengths). 
     
    Couple of things which were problems during the project:
    1. Sounds were at the beginning very wrong, they had different frequency of what it should have been (it hearded like the sounds were inverted each note). This was due to defines in the code. Because this was originally an arduino skecth, the defined note-values (like #define NOTE_C4 <number>) were direct frequencies in Hz and I didn't think of this at first and I just inserted these values into timer. So it was obviously a wrong method.
    2. In Tone.c -file I forgot to remove TAIE interrupt (which in this code is not needed) and I didn't have interrupt handler so the player produced only one note and then it was resetting itself. This was very obvious when it was detected.
     
    So here it is. Thank you for your interest. Hopefully this is useful for somebody, for me it was really fun thing to do and the interesting part was the parser code (play_rtttl) function.
     
     
    In the attachment you can find the project-files for CCSv5 and below is a picture of my speaker setup:

     
    RtttlPlayer.zip
    Edit: Added schematics for the current code.
    msp430g2231-RTTTL-Player.pdf
  5. Like
    CsCrazy got a reaction from cubeberg in MSP430 Launchpad RTTTL-player   
    Hi all!
     
    Yesterday I finished with my little project, which was to play ring-tones in rtttl-format (Ring-Tone Text Transfer Language) with MSP430G2231. I thought that some of you might be interested about the project and about the code.
     
    Code is "built" from arduino sketch which involves Tone Library and the sketch acts as a interpreter for the rtttl "code", but also the code is partly made of 'msp430 LaunchPad Music' made by Bob Somers. So this is a kind of a ported code.
     
    Here's how it works. Main part of the rtttl-player (as the CCS project is named) is the play_rtttl(*song) function, which reads the song in RTTTL-format. After the function has decoded each note, the note's frequency is selected from the lookup table and it's length is calculated. These two values (note-freqyency in timer ticks, note-length in ms) are then forwarded to PlaySingleTone(...)-function, which sets up the timer and a delay which they together produce a notable sound from the speaker.
     
    Speaker might be any low-power speaker (since MSP430G2231 doesn't have much kick to drive larger speakers) or a piezo-speaker, as in my case i used a piezo-speaker. Speaker can be connected to any of the pins in mcu, since timer A causes only interrupt when capture/compare register value is detected. Inside the interrupt the port pin is toggled.
     
    You can see or preferrably hear how this little bug plays a MacGyver theme, here's a link to my youtube video: 
     
    So with the msp430g2231 chip you can play about 45 sec long song (of course it depends on the song and it's tone lengths). 
     
    Couple of things which were problems during the project:
    1. Sounds were at the beginning very wrong, they had different frequency of what it should have been (it hearded like the sounds were inverted each note). This was due to defines in the code. Because this was originally an arduino skecth, the defined note-values (like #define NOTE_C4 <number>) were direct frequencies in Hz and I didn't think of this at first and I just inserted these values into timer. So it was obviously a wrong method.
    2. In Tone.c -file I forgot to remove TAIE interrupt (which in this code is not needed) and I didn't have interrupt handler so the player produced only one note and then it was resetting itself. This was very obvious when it was detected.
     
    So here it is. Thank you for your interest. Hopefully this is useful for somebody, for me it was really fun thing to do and the interesting part was the parser code (play_rtttl) function.
     
     
    In the attachment you can find the project-files for CCSv5 and below is a picture of my speaker setup:

     
    RtttlPlayer.zip
    Edit: Added schematics for the current code.
    msp430g2231-RTTTL-Player.pdf
  6. Like
    CsCrazy reacted to cde in Stellaris LaunchPad   
    http://processors.wiki.ti.com/index.php/Licensing_-_CCS and http://processors.wiki.ti.com/index.php/Stellaris_support_in_CCS indicates no limit, on the bundled download (Stellaris Ware + CCS). The 16kb limit still exists for the msp430 though.
  7. Like
    CsCrazy got a reaction from bluehash in Hi from Finland   
    Hi Bluehash!
     
    Nokia HQ and some R&D work is still in Finland if you didn't know
     
    A good dish? Hmmmmh... well we all have different taste, so I'm not so sure what to suggest. Maybe some gamefood, you know like reindeer, moose or some bird (wood grouse)... Fresh boiled potatoes and real butter with the gamemeat. Of course some kind of brown sauce would be nice. There are lots of good foods in here, but I'm no chef so... Almost in any restaurant in here there are some "finnish" foods available, so if you ever visit here, go ahead and try. (Menus are in finnish and in english and sometimes in swedish too.) Most of the people understand and can communicate in english since we start learning it about when we are 8-10 years old.
×
×
  • Create New...