Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by leomar01

  1. Hello @@JapiMostert, I just read this thread and your questions. Since I just finished my masters degree, I can well imagine how overwhelmed you feel facing the requirements of your project. As it's already been said, try to draw a graph of the components, how they interact and which functions you want to accomplish. Don't try to overaccomplish what's asked. Try to find the easiest ways. Don't be afraid of the term "data logging". If you just send the time of the stopwatch over UART, that's everything you need. On the MSP430G2 launchpad you have a UART->USB bridge (just in case you
  2. It executes the c-files that are being generated out of the grace.cfg during the compile process. Looking through the project settings I can't find where this gets done during compiling...
  3. I didn't know the grace config only depends on the raw text in that single cfg file, thanks @@roadrunner84 :-) I just copied the default main.cfg and renamed the second file. How does CCS determine what cfg file to use (when renamed)? Or does it just use the first *.cfg file it finds?
  4. that's a good point, thanks @@roadrunner84 If I change the check to "eventArray[i].nextTime <= millis()" the problem is also gone and saves the 4 bytes for another variable ;-) I just had a look at Energia source code. Energia spends quite some time to do the millis(); alone: __attribute__((interrupt(WDT_VECTOR))) void watchdog_isr (void) { // copy these to local variables so they can be stored in registers // (volatile variables must be read from memory on every access) unsigned long m = wdt_millis; unsigned int f = wdt_fract; m += sleeping ? SMILLIS_INC:MILLIS_INC; f += sle
  5. Erm, I think I've got it: EventTimer.h /* * EventTimer.h * * Created on: 07.07.2014 * Author: Leo_2 */ #include <msp430.h> #include "../types.h" #ifndef EVENTTIMER_H_ #define EVENTTIMER_H_ #define MAXEVENTS 10 #define EVENTTIMER_TxR TBR // Timer_B counter #define EVENTTIMER_CTL TBCTL // Timer_B control #define EVENTTIMER_MC0 MC0 // Mode control 0 #define EVENTTIMER_MC1 MC1 // Mode control 1 int AddTimerEvent(void (*function)(void), unsigned int millis, bool infinite); void initEventTimer(void); void startEventTimer(void); void stopEventTimer(void); bool g
  6. Hi there, I'm in the process of developing some wireless system. I want to have more than one transmitter - behaving just a little bit different from each other. Using Code Composer Studio I've discovered the ability to have different "build configurations". I made three different "main.c" files: main_transmitter1.c main_transmitter2.c main_transmitter3.c In build config 1 the second and third are excluded from build. In build config 2 the first and third are excluded... I think you get it. Now my question: To configure the peripherals I used Grace. Now I have a new idea
  7. Hi there, I've got something in my mind and need your advice Let's imagine we've got 8 LED's and 8 buttons attached to MSP430. (actually, it doesn't matter how many LED's or buttons, or which port they're attached to) We want a solution where a press of button one causes the first LED to light up for 1 second. After that time it'll switch off automatically. For now that's nothing special. Now, let's say every LED lights up when the corresponding button has been pressed, but every one of these LEDs switches off after a different amount of time. Moreover this whole mechanism should b
  8. Thanks @@RobG, I added that throughout my library. Up until now I'm happy with my ringbuffer implementation. Didn't encounter any issues by now Leo
  9. Thanks @@zlalanne, actually he has a lot of fifo implementations, most of them are hard to understand to me, but here's one that's pretty close to mine: http://users.ece.utexas.edu/~valvano/arm/FIFO.c I think I'll leave my implementation like it is ... until I discover a new problem ;-) Leo
  10. Hello @@igor, I had another night of trial and error As you correctly pointed out, the first byte got discarded by BufferOut. That was my solution to overcome the problem caused by directly transmitting the first byte in buffered_send_SPI. I have corrected this behaviour and again, had the problem of first byte getting sent double. Then I discovered the UCBUSY bit in UCxSTAT. Instead of directly sending the first byte to get the peripheral running... else if(in == send_toSPI_buffer.index_reading) { //IFG2 |= UCB0TXIFG; UCB0TXBUF = ch; } ... I fired an artificial interrupt t
  11. Hello @@igor, up until now I only used it to send data over a peripheral like SPI or UART. In this case only the ISR triggers BufferOut(). If the buffer is empty no new value gets written in the output buffer register of the peripheral. Thereby no ISR will fire anymore and the two indices will remain the same. Thats the reason why BufferIn() checks if the two indices were the same and if so, writes the current char directly to the register of the peripheral. If only one char has been sent to the buffer the ISR again will do nothing except increasing the reading index the thereby leading to
  12. I read that wikipedia article - I just can't make the transition to my actual case I'm now adding my current code (please excuse the german comments). First I have a layer that abstracts the ringbuffer logic: ringbuffer.h: #ifndef RINGBUFFER_H_#define RINGBUFFER_H_#define BUFFERLENGTH 64 // Must be 2^n#define BUFFER_MASK (BUFFERLENGTH-1) // Klammern auf keinen Fall vergessentypedef struct ringbuffer{ unsigned char ringbuffer[BUFFERLENGTH]; unsigned int index_reading; // zeigt auf das Feld das zuletzt gelesen wurde unsigned int index_writing; // zeigt auf das Feld in welches das n
  13. Hello, the last two days I've implemented a portable ringbuffer for use with UART, SPI or even different microcontrollers (minor changes required). I grabbed some ideas from here and there and mixed it all together in my own solution. I tested the functionality with some code that writes in unregular time distances into the buffer while the SPI TX interrupt is reading from it. It _seems_ to work well, but a friend of mine told me I definately have to deactivate the interrupt in "critical sections" of my code. Now I'm a little bit stuck. How do I identify what a critical section is? I
  14. Wow thanks for the quick answer oPossum I think I've misunderstood the purpose of UCxSTE. On the eZ430-RF2500T target board UCB0STE (Port 3.0) is connected to CSn of the CC2500. Therefore I thought UCxSTE is some kind of auto hardware controlled chip select that's being driven low when transmitting. Ok, if got it right, I have to use 3-pin mode and use P3.0 as a normal output that I manually drive low during communication with the attached cc2500, right? Leo
  15. Hello, after years of abstinence I'm back to playing with TI hardware. I'm using the eZ430-RF2500 Development Tool with CCS and Grace. While implementing a ringbuffer for SPI I ran into an unexpected behaviour. (using USCI_B ) By writing a byte to UCB0TXBUF the UCB0TXIFG Interrupt should fire, right? Ok, I made a minimal example with Grace, only clocks and the SPI interface configured. I placed a _NOP(); in the ISR and a breakpoint on it. In main I add the line UCB0TXBUF = 'a'; When the SPI interface is configured as 3-Pin it does halt at the breakpoint. If I configure
  16. yes, of course it will suffice - but ihmo you shouldn't rely on the capabilities of the fab by using their absolut minimum trace width when not absolutely necessary
  17. wouldn't it be advisable to make the traces at least 8mil? I think 10 mil could be achieved on nearly every part of the board.
  18. Up until now I didn't put anything in sleep. I did the measurement with the original supplied firmware on the MSP430G2553 that came with the anaren booster pack. Since I didn't have any success in getting the supplied code from anaren to work, I even don't know what they are doing in their firmware. That's why I asked in my initial post: "Did Anaren really miss the low power (sleep) modes of the components?" This weekend I'll be trying to understand the code CorB attached. If it meets my requirements, I'll stick to it. If not, my next step will be simpliciTI. @larsie: To make things cl
  19. thanks for the code, CorB I'm still trying to understand it. I'll ask my questions when I'm able to But, this code isn't simpliciTI, am right? As far as I can tell, it's based on mobilars' code. That code is again, based on the TI library "MSP430 Interface to CC1100/2500 Code Library" (slaa325a). And (you guessed it) that one is based on the old "Application Note N049" from chipcon. In that list I don't see simpliciTI mentioned. Maybe I'm completely wrong (still didn't have the time to read the simpliciTI docs).
  20. no, only the MSP430 and anaren module I'll also be using the DS18B20 :-) Next step for me will be the simpliciTI stack on the Anaren booster pack. When I have that working, I'll redo my measurements.
  21. Dear forum members, As a X-Mas gift for my dad, I want to build a wireless thermometer with four transmitters. He allready has something cheap, but it doesn't work so well over the ~30m distance from the garden to the living room. Therefore I want to build something accurate, long distance, "endless battery life" (the transmitter will end in some rubber enclosure, so it can withstand the weather - therefore, ideally it shouldn't be nescessary to change batteries for the next 10 years or so) and rssi readout to determine if the wireless connection is good. Ok, that's my goal. This wee
  22. I'm relatively new to tinkering with electronics. Soon I felt like I would need an oscilloscope. I'm also still a student and thus, money is always a problem. My parents got me the above mentioned DS1052E from Rigol as a birthday gift (man I'm lucky). Not much time went by until I was sure I would also need a logic analyser. Of course I bought that very good Saleae Logic. Now (after 3 months) I can say that I should've bought the Logic first. I can check almost everything I need with the Logic. I really recommend you to buy the Logic first. Then, please do yourself that favour, save your money
  23. I also had these problems. Took me hours(!) until I just rebooted my computer and everthing was fine again.
  24. I think they should go with female headers and include the aforementioned male-male headers. So you have female headers at both ends (launchpad and boosterpacks) and the male headers that get sometimes damaged (I often bend pins accidentially when removing shield/booster packs) are easily replaceable. Also there are no problems with shorts. And you're still compatible to all kinds of boosterpacks regardless of male or female headers. I allready do it like that on my launchpad
  25. Hi there, today I received my booster pack. I'm a little bit confused on how the booster pack has to be inserted into the launchpad. Directly on the launchpad it says "this side up" written on the arrow. But, with that side up it can't be put into the launchpad. Is it correct that the anaren rf module has to face down when the booster pack is inserted into the launchpad? regards, leo edit: aaawww I see ... after watching this video: http://www.anaren.com/content/Media/Boo ... Anaren.wmv I've got the wrong headers in my launchpad Glad I investigated deeper than just trying i
  • Create New...