Jump to content


  • Content Count

  • Joined

  • Last visited

About Varol

  • Rank

Contact Methods

  • Website URL

Profile Information

  • Location
    Herndon, VA
  1. Should have said hash table or array struct _ {int K,V;char X,Y,D;} A; /* hash table, 16M+8 entries*/
  2. I am thinking about using the shell interface from the i2c_explorer, and then doing some small changes to http://home.hccnet.nl/h.g.muller/max-src2.html ... just needs more than 512 Bytes of RAM to store the hash map Just imaging the other projects you can do if you have more ram. E.g. you could write procedural textures and then hook up a display ... Need more ram. I know that I can either switch the package format or the uC. Just wondering why ? I agree that in theory handling the other package types are not too difficult but it will add additional requirements, You'll need a b
  3. Looking through http://www.ti.com/lit/sg/slab034v/slab034v.pdf I can see that the highest amount of RAM for devices which I can plug into the launchpad is the MSP430G2553 with 16kRom and only 512Bytes of RAM. Is there another device I can program using the msp430 launchpad which has more RAM ? I would like to see 8kB or 16kB in a simple device like this without the need to use a special prototype board for E.g. LQFP or VQFN, like the MSP430F5304 or the MSP430F5342. I am wondering because it could open the door to many more applications to beginners who are looking for an easy and chea
  4. Thanks, I tried this and it works. This was the single line change I have been hunting for about two weeks. It exits LPM0 mode and stops the USI callback from being called relentlessly. Now I have two working i2c slave versions. I know that there is a lot of i2c code out there where they commented out the line LPM0_EXIT; in the i2c slave code and they handle this differently. What I am asking here is how can this be improved ?
  5. ... Ah, I continued my investigation and I have to take it back. It is my code. A quirky'ness inside I did not see. Thank you for wanting to help out. My confidence in mspgcc went up tremendously ( and my confidence in my programming went down ). One other question I have, and this is not a bug, just an observation with the generated assembler. In one instance an array of char is converted into a bunch of add/mov. If I add one variable in front of the string definition it will cause the assembler to create a .string and then use call #memcpy. I could not find a pattern. Not that
  6. pabigot, I collected some data on one of the compiler issues I run into. I compared the generated assembler code of two functionally the same code but one works, the other doesn't. What can I do to see if we can fix this ( and maybe other issues ) in mspgcc ? It is the only feasible option for me at the moment, and I would like to be able to have more confidence in this great tool. This example is from my I2C master, but I had similar strange issues getting i2c_explorer to run on my msp430g2231. Just in case you are curious ( or bored ) http://www.MovingSatellites.com/compiler
  7. After a long back and forth I finally gave up on my original software design, which was: main() { initUSI(); // state engine in callback while ( 1 ) { enterLPM0(); // After all bytes are received in USI callback this will be released resetStateEngine (); display ( string ); } } I am now handling the display of the text from within the USI callback ( state engine ). This works quite nicely, however I was stumped to have to change the SW in this way, as it will not allow me to build more complex designs. I was also surprised to see so much code out
  8. Varol

    i2c Explorer

    Okay, I've gotten i2c_explorer compiled using mspgcc under Linux. There were some strange things going on with the compiled version in shell.c : handle_command and I had to remove the capability to generate repeated commands ( using ':' ), which I attribute to compiler issues with -Os optimization enabled. I have only used version 1.0 and it is working quite nicely now for me. But I was also able to compile version 1.1 after making the same changes there. You can download the source for both versions ( 1.0, and 1.1 ) from http://www.MovingSatellites.com/i2c_explorer.tar.gz And
  9. So I spent the past 7h trying to figure out what is going on. I used i2c_explorer and I think the problem is the mix of USI interrupt handler and LPM0. All works except when I try to exit the interrupt routine and continue with my main program ( LPM0_EXIT; ) The USI interrupt routing is called from there on constantly. If I don't exit LPM0, I can repeatedly send commands to the slave. The question is, How can I gracefully exit LPM0 and reset the msp430g2231 such that the USI interrupt is no longer called ? Here is the pseudo code main ( ) { // First run initUSI (
  10. Varol

    i2c Explorer

    I made the optimization you mentioned. It only saved me 2 bytes. I saved the required bytes by changing a couple of things. parse_number ( const uint8_t *str, uint8_t len, uint32_t *result ); to parse_number ( const uint8_t *str, uint8_t len, uint16_t *result ); I also changed all init functions to inline ( .h, and .c files ) bash> grep inline *.h console.h:inline void console_init(void); i2c.h:inline void i2c_init(void); uart.h:inline void uart_init(void); This allowed me to squeeze all into 2020 bytes. bash> msp430-size .obj/*.o text data bss dec hex fil
  11. Will look into re-using the master code to get one side working first. I tried to compile i2c_explorer but for a 2231 device I run out of rom. I am busy this week but I definitively will try to get things working a small step at a time. The problem I have dealt with were on multiple fronts TDD is what I have spent the most part of my time trying to get things to work. Unfortunately once I drilled down on one side. another side which used to work stopped working. I believe I stumbled over some compiler issues when code optimization is turned on. I tried using CCS under Linux, and a whol
  12. Varol

    i2c Explorer

    I want to build this using mspgcc but I exceed : "region `rom' overflowed by 86 bytes" compiling it for a msp430g2452, I get a complete code size of 2134 bytes Just above 2k. Let me know if anyone has actually gotten this one to compile for a 2231 using mspgcc. bash> make if [ ! -e .obj ]; then mkdir .obj; fi; msp430-gcc -Os -Wall -mmcu=msp430g2231 -c uart.c -o .obj/uart.o msp430-gcc -Os -Wall -mmcu=msp430g2231 -c shell.c -o .obj/shell.o msp430-gcc -Os -Wall -mmcu=msp430g2231 -c console.c -o .obj/console.o msp430-gcc -Os -Wall -mmcu=msp430g2231 -c main.c -o .obj/main.o msp
  13. Having similar issues getting I2C working. First Question are you using mspgcc or CCS ? Second can you try to disable optimization ( I.e. -O0 instead of -Os )
  14. I will surely post the results here, if I get them. I may do a writeup. here is the link to the short video how it currently looks with the code from the above link. As you can see the red LED1 turns off after the initial send, then pressing the button it turns on for a short period, as expected before the program gets into the I2CMaster_Transmit function and then starts to flicker ( line 185 in m_i2c.c ) ... m_master.c ... while ( 1 ) { P1OUT &= ~LED1; // Send out some information to the slave I2CMaster_Transmit ( array1, 16 ); P1OUT |= LED1;
  15. All, ( Closed ) I was offering a $50,- to some one who could fix the provided code. Below is the original message. I explain in message #11 what I did to make it happen. ---- Note: modified source code Jan 19 2012 I have spent over two months now trying to get a simple I2C communication going and to display the string send from the master to the slave. I HAVE FAILED. Here is a chance to easily earn $50,- ( That is good for 12 Launch Pads .. ) What do I want: 1) I want to learn from this, that is why I would like you to get my current code to work 2) I should be a
  • Create New...