Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Reputation Activity

  1. Like
    CorB got a reaction from roadrunner84 in Variable value unintentional changing ...   
    It seems I found the culprit ... 
    the routine
    RFReceivePacket(rxBuffer,&len)     gets a received RFpackage into rxBuffer and does a sizecheck on len ... which is  len=0xff. Thats the maximum package that can be read in one time.  But my rxBuffer was kept far smaller (just a bit bigger than a normal RFpackage. So when a too large package (due to interference or other issues) arrives its placed into the rxBuffer and ... beyond. That was surely overwriting my textcolour variable. Ive changed the code and ... all is well.   Thanks for helping me rethink what was happening !!!    Sorrry for the wildgooschase.   CorB
  2. Like
    CorB reacted to pabigot in Variable value unintentional changing ...   
    Could be that the variable is placed in memory that gets overwritten by stack contents during deeply-nested calls, including calls invoked from interrupt handlers.  You could try putting the variable inside a structure that has marker values (classically word values like e.g. 0xdead and 0xbeef) on either side, and checking that the marker values, which are never supposed to be written after they're initialized in main(), remain unchanged at various points in your code.
  3. Like
    CorB reacted to jkabat in Anaren Air Boosterpack on Stellaris   
    That actually should be OK.
    You might want to try:
    #pragma pack(1)
     ... define your structure here
    #pragma pack()
    You might be having problems with word alignment. The compiler may force uint16_t to be aligned on a word boundry. 
    The pack(1) forces aligment to 1 byte. the pack() restores it to whatever the compiler is using.
    I have to do this all the time on my x86 stuff.
  4. Like
    CorB got a reaction from EmBlocks in Hello, from Netherlands   
    greetings from Middelburg
  5. Like
    CorB reacted to jkabat in Anaren Air Boosterpack on Stellaris   
    Here is a useful function;
    uint16_t swap16(uint16_t val) {
    return ((val & 0xFF) << 8)
    | ((val >> 8) & 0xFF);
    I make my own include files that conditionally compile based on the endian type of the host. All external items should be little endian. 
    #ifdef  WE_ARE_BIGENDIAN
    #define swap16_external(val)  (((val & 0xFF) << 8) | ((val >> 8) & 0xFF)))
    #define swap16_external(val)  (val)
  6. Like
    CorB reacted to spirilis in Building low power into Energia   
    My thought is to have an additional class of functions, e.g. LowPower.<method> with specialized delays that allow one to make use of LPM3 and perhaps LPM4 as needed.  The goal I had in mind is to boil LPM down to basic primitive modes that are available on many chips--as most chips do have some sort of "sleep" vs "deep-sleep/hibernate with a periodic tick to wake up" sort of feature.  With a high-level API for this, a low-power application could be ported seamlessly from MSP430 to Tiva.
  7. Like
    CorB reacted to RobG in Ethernet Booster Pack v3   
    Buy: The 43oh Store or Rob's Tindie Store.
    The newest version of the Ethernet BoosterPack is based on the newest chip from WIZnet, W5500.
    P1.5 - SCLK
    P1.6 - MISO
    P1.7 - MOSI
    P2.3 - /CS
    P2.4 - /INT
    P2.5 - /RST

    Configuration jumpers are on the bottom, PMODE1-PMODE3, LINK LED, and ACT LED.
    LED jumpers control which LEDs are used, on board or socket.

    Available on Tindie.
  8. Like
    CorB got a reaction from larsie in AIR BoosterPack Library   
    Hi Lars,
    The port to energia is available from:
  9. Like
    CorB got a reaction from Register in Regulating power for RF24l01// PB with auto reset   
    I am running an DS18B20 and an Anaren Air Boosterpack from 2xAAA batteries without problems. Dont think you need 3V minimum for a DS18B20.
    EDIT: done a bit of research, it seems that below 2.7V the DS18B20 becomes less reliable. See http://openenergymonitor.org/emon/node/2331
  10. Like
    CorB reacted to spirilis in The Sub-1GHz BoosterPack for 2013/2014   
    Working on a diptrace pattern & component for the CC1200... when I get my samples I'll print out a gerber of the footprint and see how it matches up.
  11. Like
    CorB reacted to jpnorair in The Sub-1GHz BoosterPack for 2013/2014   
    SmartRF compatibility is not so trivial.  The 5529 has a ton of RAM and Flash, though.  I would recommend, instead, to support a build for the LP side of things that has the SRF firmware.  If someone in the community wants to be plucky, maybe he/she will integrate the SRF features in some sort of button toggle-able way via the LP.  There should be enough flash to do so.  10/128 is, really, a ton of resources for WSN.  Anything except ZigBloat will fit happily into 64KB flash.
  12. Like
    CorB reacted to Automate in The Sub-1GHz BoosterPack for 2013/2014   
    A nice extra feature of the V-Chip BP is that it also has a USB port for connection to a PC without an MCU.  This allows it to use the TI SmartRF Studio software  http://www.ti.com/tool/smartrftm-studio which has the following features:
    Link tests. Send and Receive packets between nodes. Antenna and radiation tests. Set the radio in continuous TX and RX states. Easy Mode for packet testing and for getting basic register values. A set of recommended/typical register settings for all devices. Read and write individual RF registers. Detailed information about the bit fields for each register. Save/Load device configuration data from file. Exports register settings to a user definable format. Communication with evaluation boards through USB port or the parallel port. Up to 32 evaluation boards are supported on a single computer. And all the features of the SmartRF Protocol Packet Sniffer http://www.ti.com/tool/packet-sniffer Packet sniffer for SimpliciTI
  13. Like
    CorB reacted to jpnorair in Flutter - Kickstarter to use new TI CC1200   
    If you get a 433 MHz CC430 PanStamp (not available yet), I can give you code that will make it go 1km.
  14. Like
    CorB reacted to oPossum in Nickel Metal Hydride Power Source   
    That is usually not true due to I2R losses in the power source. Running at the lowest practical clock gives the highest capacity utilization and thus the longest battery life.
  15. Like
    CorB reacted to oPossum in Nickel Metal Hydride Power Source   
    See page 20 of SLAS735A.

  16. Like
    CorB reacted to RobG in (Universal) Color LCD graphics library   
    Time to clean-up the library and add more features (thanks to @@CorB for motivation.)
    Add: horizontal/vertical orientation
    Removed: Nokia displays, 8bit color
    See the first post for the latest files.
    I will be adding hardware SPI and touch support in few days.
  17. Like
    CorB reacted to bluehash in Found a goldmine of MSP430 beginner code   
    Just browsing, when suddenly:
    1. Prepping for the MSP430 2. Out of the box 3. Blinking lights number 2 4. Pushbutton fun 5. More pretty lights 6. Community Coding Style 7. Button triggered interrupts 8. Hello World revisited 8.1. Internal watchdog timer 8.2. External timer crystals 9. Blinking lights revisited 9.1. Using internal timer 9.2. Using external crystal 10. Pulse Width Modulation 10.1. Sleeping LED 10.2. Which pins do PWM? 11. Talking to MSP430 via Launchpad USB interface 12. Yet another Hello World 13. Serial communication 1 14. Serial communication 2 15. Adding button debounce 16. A Uart receiver 17. Send and Receive 18. Send and Receive 2 19. Increasing the clock speed 20. Reading off calibration values 21. A more robust calibration program 22. Dissecting the TI temperature demo 23. Bit-bang I2C interface for Newhaven LCD panel 24. Bit-bang SPI interface for ktm-s1201 LCD panel 25. Morse Code on the MSP430 http://dbindner.freeshell.org/msp430/#_recovering_a_fram_experimenter_8217_s_board'>26. Recovering a FRAM Experimenter
  18. Like
    CorB reacted to bluehash in Found a goldmine of MSP430 beginner code   
    Wow! very good detail:
    23. Bit-bang I2C interface for Newhaven LCD panel
    Not sure how I missed this site.
  19. Like
    CorB reacted to RobG in (Universal) Color LCD graphics library   
    Time wise, sending 2 bytes is pretty much the same as clocking the first bit manually.
  20. Like
    CorB reacted to Rickta59 in 1K serial gdb_bootloader   
    Originally, this is what I was thinking of doing. However I'm going to target the larger chips, so the amount of memory used by this won't really be signficant. 
    The reason I decided to do this over BSL was its simplicity. With BSL you need to twiddle the Test/Reset/BSL TX/ BSL RX. That means I have to write custom host code, or find a bsl loader program. I have to figure out which pins are BSL/TX/RX, I have to make sure the usb device I'm using supports the ability to toggling the DTR/CTS pins at the right time. The other way I've seen people implement bsl loading, is with a launchpad that is acting as a bridge. I think that is TI's published solution. However you are wasting a launchpad and a chip to do this and you still have to make sure the circuit on the target device isn't affected by the BSL setup.
    With this solution I don't need a smart dongle. In fact using the virtual serial port of the msp430 launchpad proves that point. : )
    You can even use this with a wireless serial dongle. There is no flow control to worry about really.
  21. Like
    CorB got a reaction from bluehash in SimpliciTI review   
    Hi Bluehash,
    Technically the code I am using isnt SimpliciTI, TI calls it "MSP430/CC1100-2500 Interface Code Library v1.1" . Its however very simply and puts a very low memory burden on the MCU. More can be read at http://www.ti.com/lit/an/slaa325a/slaa325a.pdf
  22. Like
    CorB reacted to RobG in (Universal) Color LCD graphics library   
    @@CorB You can ignore it.
    @@andresv Just this thread for now, but I am planning to move all my code to github, hopefully this month.
  23. Like
    CorB reacted to RobG in MSP430G2955 Launchpad Development   
    OK, moved things around, how about this one?

  24. Like
    CorB reacted to bluehash in Call members to attention in posts.   
    Sweet! Thanks for the test.
  25. Like
    CorB reacted to oPossum in G2553 Hardware UART "Hello World" Example   
    #include <msp430.h> #include <stdint.h> const unsigned RXD = BIT1; const unsigned TXD = BIT2; const unsigned SW2 = BIT3; const unsigned long smclk_freq = 16000000; // SMCLK frequency in hertz const unsigned long bps = 9600; // Async serial bit rate // Output char to UART static inline void putc(const unsigned c) { while(UCA0STAT & UCBUSY); UCA0TXBUF = c; } // Output string to UART void puts(const char *s) { while(*s) putc(*s++); } // CR LF void crlf(void) { puts("\r\n"); } // Output binary array to UART void putb(const uint8_t *b, unsigned n) { do putc(*b++); while(--n); } // Print unsigned int void print_u(unsigned x) {     static const unsigned dd[] = { 10000, 1000, 100, 10, 1 };     const unsigned *dp = dd; unsigned d;     if(x) { while(x < *dp) ++dp;         do { d = *dp++; char c = '0'; while(x >= d) ++c, x -= d; putc(c); } while(!(d & 1));     } else putc('0'); } // Print signed int void print_i(const int x) { if(x < 0) putc('-'); print_u((x < 0) ? -x : x); } // Print hex nibble static inline void puth(const unsigned x) { putc("0123456789ABCDEF"[x & 15]); } // Print hex byte void print_hb(const unsigned x) { puth(x >> 4); puth(x); } // Print hex word void print_hw(const unsigned x) { print_hb(x >> 8); print_hb(x); } void main(void) { WDTCTL = WDTPW + WDTHOLD; // No watchdog reset // DCOCTL = 0; // Run at 16 MHz BCSCTL1 = CALBC1_16MHZ; // DCOCTL = CALDCO_16MHZ; // // P1DIR = ~(RXD | SW2); // Setup I/O for UART and switch P1OUT = P1REN = RXD | SW2; // P1SEL = P1SEL2 = RXD | TXD; // // const unsigned long brd = (smclk_freq + (bps >> 1)) / bps; // Bit rate divisor UCA0CTL1 = UCSWRST; // Hold USCI in reset to allow configuration UCA0CTL0 = 0; // No parity, LSB first, 8 bits, one stop bit, UART (async) UCA0BR1 = (brd >> 12) & 0xFF; // High byte of whole divisor UCA0BR0 = (brd >> 4) & 0xFF; // Low byte of whole divisor UCA0MCTL = ((brd << 4) & 0xF0) | UCOS16; // Fractional divisor, oversampling mode UCA0CTL1 = UCSSEL_2; // Use SMCLK for bit rate generator, release reset for(; { // int n = 1; // do (P1IN & BIT3) ? --n : (n = 5000); while(n); do (P1IN & BIT3) ? n = 5000 : --n; while(n); puts("Poke me with a Stick\r\n"); // for(n = -5; n <= 5;) print_i(n++), putc(' '); crlf(); n = 0xDEAD; print_hw(n); putc(' '); // n += 0xE042; print_hw(n); crlf(); // crlf(); // } // } //  
  • Create New...