Jump to content
43oh

larsie

Members
  • Content Count

    297
  • Joined

  • Last visited

  • Days Won

    7

Reputation Activity

  1. Like
    larsie reacted to warg-vs in [Energia Library] OneWire DS18B20 (430 & Stellaris)   
    Hello! Cannot run on the MSP430, compiles but does not find sensor. :!!!: 
  2. Like
    larsie reacted to OzGrant in [Energia Library] OneWire DS18B20 (430 & Stellaris)   
    Opps, zip file now attached
    GFDS18B20.zip
  3. Like
    larsie reacted to greeeg in Over the air programming   
    Another implementation.
     
    Make a stripped down version of your code. that can just respond to OTA commands. This would be your bootloader. It would run until a new firmware was flashed in the flash below it. 
     
    On boot, this code would run first and only run your actual firmware if it's CRC was good.
     
    I was trying to find some articles that show the memory map. But I can't seem to find the ones I'm thinking of.
  4. Like
    larsie reacted to jpnorair in Over the air programming   
    For embedded RF, the best way to do it is to have double the Flash necessary, and then just load the new firmware into the other half of flash.  Once it is fully loaded, restart.  Your bootloader can be tiny, it just needs to jump to the newer half.  One thing, however, is that you will need two builds of the firmware: one built to start at offset A and the other at offset B.
     
    Another thing you need is a radio layer that is robust against data errors.  built-in CRC on the 1101 isn't sufficient unless you are using fixed-length packets. If you are using variable length packets, you need to find a way to protect the header with its own CRC, and even then you might want an internal CRC32.
  5. Like
    larsie reacted to BRey in Over the air programming   
    Felix at lowpowerlabs has set it up on his moteinos(Arduino minis with RFM radios) using an SPI flash module and a modified bootloader that looks for hex records in the flash when it starts.  He has some posts and links to his github here:  http://lowpowerlab.com/blog/category/moteino/wireless-programming/  
     
    Hopefully his explanations and codes samples will be helpful (I am also on thin ice regarding this stuff).
    B
  6. Like
    larsie got a reaction from CodilX in LEDs blink/fade with music?   
    If you just want a sound-level thing, only need a microphone board like this: https://www.sparkfun.com/products/9868 or http://www.seeedstudio.com/depot/grove-sound-sensor-p-752.html?cPath=25_27
     
    Connect the microphone board to an analog input of the MSP430 and use for example Energia to read the sound level. Go in a loop and read the sound level, then use the digital output of your MSP430s. Set more LEDs if the sound level is high. Then connect an LED (and a series resistor to ground) to each digital output. If you have large LEDs and want  lots of light, you need transistors or other driving circuits to give more current to your LEDs. 
     
    If the above is what you're looking for, I can draw a diagram for you. 
     
    If you want an equalizer, you could use this: https://www.sparkfun.com/products/10468 (you need to connect it to a mike board). It's quite a cool chip, and it would give you a more advanced effect. But it's slightly more tricky to use. 
  7. Like
    larsie reacted to zeke in F5529 Breakout Dev Board (Now with pics!)   
    Remember. Nothing personal.
     
    The first thing I always look at is the crystals.
     
    A guy I used to work for thought he was hot **** as a layout artist because he could a) buy the $6000 software with pocket change and knew how to engage the autorouter function. His precious autorouter managed to make one leg of the crystal 4cm long and the other leg 8cm long while passing through at least two vias!
     
    I had to break it to him that his board wouldn't run even at 32kHz. I thought I was going to get fired.
     
    Anyhoo. Water under the bridge.
     
    This is just a few of my observations.
     

    - Ground the body of XT1 (32kHz). Make sure to use a big thermal relief pad just like your 0.032" through-hole grounds.
    - Switch XT2 to an HC49/U style crystal. It's SMD, easy to obtain and super easy to work with. (eg: Abracon ABLS-16.000MHZ-B4-T)
    - Rotate R5 and C4 a quarter turn so that their common pads are closer together
    - Rotate R4 and C3 a quarter turn so that their common pads are closer together also.
    - The USB lines must be routed as an impedance controlled transmission line. 0.010" tracks spaced at 0.010" over top of ground plane on the other side should maintain 50ohms.
    - Add in two ESD surge protectors between the USB N & P lines and ground. eg: Littelfuse PGB1010603NR. Place them close to the USB connector ahead of R8 and R9
    - R10, C13 and C14 on the USB N and P lines. Why? I can't see that being a good thing. Is that in a TI App Note?
    - Change R8 and R9 to 10ohm. Did TI suggest that value?

     
    I can see your preferred layout pattern (45') and I can see the attention to detail.
     
    Good use of ground vias.
     
    All in all, good job!
     
    I hope that was helpful.
  8. Like
    larsie got a reaction from bluehash in BLE113 Breakout board with MS430G2553   
    I've made a BLE113 breakout-board with an MSP430G2553 on it and some buttons. This board isn't tested yet, but in case it's of interest, here are the eagle files. As you can see, it could be made a lot smaller. It is using this following Eagle component for the BLE113.
     


    apus_baby_ble_v1.zip
  9. Like
    larsie reacted to spirilis in Nokia 1202 / STE2007 skeleton driver   
    Took the text terminal framebuffer code from my rxokaya lib -- https://github.com/spirilis/rxokaya -- and adapted it for the MSP430 with this Nokia 1202 display.  It stores a 128-byte framebuffer, 16 * 8, and supports software-based terminal scrolling.
     
    Example:
    #include <msp430.h> #include <stdint.h> #include "chargen.h" #include "usci_spi.h" int main() { WDTCTL = WDTPW | WDTHOLD; DCOCTL = CALDCO_16MHZ; BCSCTL1 = CALBC1_16MHZ; BCSCTL2 = DIVS_1; // SMCLK = DCO/2 (8MHz) //__delay_cycles(8000); // Short delay to let the LCD wake up -- turns out this isn't necessary // Chip select P2DIR |= BIT0; P2OUT |= BIT0; // Drive it high to disable LCD // Backlight P2DIR |= BIT5; P2OUT |= BIT5; // Turn on backlight spi_init(); msp1202_init(); msp1202_puts("Hi there my\n"); msp1202_puts("name is Eric.\n"); while(1) { __delay_cycles(16000000); msp1202_puts("txt 1"); __delay_cycles(16000000); msp1202_puts("txt 2"); } LPM4; return 0; } void test_chipselect(uint8_t onoff) { P2OUT = (P2OUT & ~BIT0) | (onoff & 0x01); } Result:

     

     
    Need to add a simple function to set the cursor position (never did that for rxokaya either), it'll shift the msp1202_x and _y variables and erase/move the cursor as well.
     
    Updated codebase: msp1202_v0.3.zip
    This stuff is in the "terminal" subdirectory, chargen.c / chargen.h adds this code.  It wraps ste2007_init() so you just have to run msp1202_init().
     
    edit: Added a msp1202_move(x, y) function, tested it & it works.  Deleted the v0.2 version I'd uploaded and replaced it with v0.3 which has this function now.
  10. Like
    larsie reacted to CorB in AIR BoosterPack Library   
    Hi Lars,
     
    The port to energia is available from:
    http://forum.43oh.com/topic/3781-energia-library-anaren-cc110l-air-boosterpack/
     
     
    cheers
    Cor
  11. Like
    larsie got a reaction from multivac in PCBA at Seeed with MSP430?   
    Thanks Rob. I tried Elecrow as you suggested. Really nice results. Boards came to about 10 USD per board, with components, dhl shipping etc, when making 10 boards. Quite a lot of small components, connectors etc, so I think it's a good price. They also soldered 0402 components very nicely. 
  12. Like
    larsie got a reaction from oPossum in PCBA at Seeed with MSP430?   
    Thanks Rob. I tried Elecrow as you suggested. Really nice results. Boards came to about 10 USD per board, with components, dhl shipping etc, when making 10 boards. Quite a lot of small components, connectors etc, so I think it's a good price. They also soldered 0402 components very nicely. 
  13. Like
    larsie got a reaction from Automate in PCBA at Seeed with MSP430?   
    Thanks Rob. I tried Elecrow as you suggested. Really nice results. Boards came to about 10 USD per board, with components, dhl shipping etc, when making 10 boards. Quite a lot of small components, connectors etc, so I think it's a good price. They also soldered 0402 components very nicely. 
  14. Like
    larsie reacted to spirilis in Nokia 1202 / STE2007 skeleton driver   
    I put this together to get the ball rolling for proper support for the Nokia 1202 LCD display detailed in the discussion & links here -- http://forum.43oh.com/topic/3724-43oh-nokia-1202-lcd-display-boosterpack/
     
     
    This breaks out the Nokia 1202 driver primitives into a library of C functions which call upon a 9-bit SPI function & chipselect driving expression/function that the user must supply (as a #define to whatever you use) near the top of the driver file (ste2007.c).
     
    For now I've taken the USCI SPI driver from my MSPRF24 library and doctored it up to support 9-bit SPI, doing a manual bit-bang on the USCI_B port for the 9th bit and then letting the USCI hardware clock out the other 8 bits.
     
    But first, pic:

     
    Main code for that (using msp430g2553):
    #include <msp430.h> #include <stdint.h> #include "usci_spi.h" #include "ste2007.h" #include "font_5x7.h" int main() { WDTCTL = WDTPW | WDTHOLD; DCOCTL = CALDCO_16MHZ; BCSCTL1 = CALBC1_16MHZ; BCSCTL2 = DIVS_1; // SMCLK = DCO/2 (8MHz) //__delay_cycles(8000); // Short delay to let the LCD wake up -- turns out this isn't necessary // Chip select P2DIR |= BIT0; P2OUT |= BIT0; // Drive it high to disable LCD // Backlight P2DIR |= BIT5; P2OUT |= BIT5; // Turn on backlight spi_init(); ste2007_init(); ste2007_invert(0); // Normal display, not inverted. ste2007_putchar(0, 0, font_5x7['!'-32]); ste2007_putchar(-1, 0, font_5x7['A'-32]); ste2007_putchar(-1, 0, font_5x7['C'-32]); ste2007_putchar(-1, 0, font_5x7['D'-32]); ste2007_putchar(-1, 0, font_5x7['~'-32]); ste2007_putchar(0, 1, font_5x7['M'-32]); ste2007_putchar(-1, 1, font_5x7['y'-32]); ste2007_putchar(-1, 1, font_5x7[' '-32]); ste2007_putchar(-1, 1, font_5x7['n'-32]); ste2007_putchar(-1, 1, font_5x7['a'-32]); ste2007_putchar(-1, 1, font_5x7['m'-32]); ste2007_putchar(-1, 1, font_5x7['e'-32]); ste2007_putchar(-1, 1, font_5x7[' '-32]); ste2007_putchar(-1, 1, font_5x7['i'-32]); ste2007_putchar(-1, 1, font_5x7['s'-32]); ste2007_putchar(0, 2, font_5x7['E'-32]); ste2007_putchar(-1, 2, font_5x7['r'-32]); ste2007_putchar(-1, 2, font_5x7['i'-32]); ste2007_putchar(-1, 2, font_5x7['c'-32]); ste2007_putchar(-1, 2, font_5x7['.'-32]); ste2007_contrast(10); // A little lighter than the default LPM4; return 0; } void test_chipselect(uint8_t onoff) { P2OUT = (P2OUT & ~BIT0) | (onoff & 0x01); } Function prototypes for the ste2007 driver functions:
    /* Library functions */ void ste2007_issuecmd(uint8_t, uint8_t, uint8_t); void ste2007_issue_compoundcmd(uint8_t, uint8_t, uint8_t); void ste2007_init(); void ste2007_clear(); void ste2007_setxy(uint8_t, uint8_t); // X is pixel column from 0 to 95, Y is page address from 0 to 8 void ste2007_write(const void *, uint16_t); // Write to current DDRAM cursor void ste2007_invert(uint8_t); // Invert display (0 = normal, 1 = invert) void ste2007_powersave(uint8_t); // Powersave (0 = active mode, 1 = powersave ~1-3uA mode) void ste2007_contrast(uint8_t); // Electronic Volume setting, 0-31 (16 is default) void ste2007_refreshrate(uint8_t); // Refresh rate of LCD controller, supported values 65/70/75/80, 65Hz is default. void ste2007_putchar(int16_t, int16_t, const void *); /* Write 5 bytes + a zero byte to the specified text * cursor address X coordinate is 0-15 and is multiplied * by 6 to derive graphical column address. * **Specifying a number < 0 (e.g. -1) for either address * skips the ste2007_setxy() call and writes the * character to the current DDRAM cursor address. */ Current codebase:
    msp1202_v0.1.zip
  15. Like
    larsie reacted to spirilis in Nokia 1202 / STE2007 skeleton driver   
    Haven't been doing much msp430 stuff the past 2 weeks courtesy of issues at my house, but just now I got G2955 (G2xx4/G2xx5) support in the usci_spi.c portion of my "msp1202" library and a test g2955 app in the terminal/ subdir.  Using RobG's G2955 launchpad board.
     
    Main change is the USCI_B ports include P3.1,3.2,3.3 and P3SEL2 needs to be *cleared* to enable the USCI function, not set like the G2xx3's.
    Pin layout is different on the outer pins too so I had to modify the pin used for chipselect & backlight.
     
    Test code:
    #include <msp430.h> #include <stdint.h> #include "chargen.h" #include "usci_spi.h" int main() { WDTCTL = WDTPW | WDTHOLD; DCOCTL = CALDCO_16MHZ; BCSCTL1 = CALBC1_16MHZ; BCSCTL2 = DIVS_1; // SMCLK = DCO/2 (8MHz) //__delay_cycles(8000); // Short delay to let the LCD wake up -- turns out this isn't necessary // Chip select P4SEL &= ~BIT2; P4SEL2 &= ~BIT2; P4DIR |= BIT2; P4OUT |= BIT2; // Drive it high to disable LCD // Backlight P2DIR |= BIT4; P2OUT &= ~BIT4; // Turn on backlight spi_init(); msp1202_init(); ste2007_contrast(8); msp1202_puts("Hi there my\n"); msp1202_puts("name is Eric.\n"); msp1202_move(8, 0); while(1) { __delay_cycles(16000000); msp1202_puts("txt 1"); __delay_cycles(16000000); msp1202_puts("txt 2"); } LPM4; return 0; } void test_chipselect(uint8_t onoff) { P4OUT = (P4OUT & ~BIT2) | ((onoff & 0x01) << 2); } Pics:

     

  16. Like
    larsie reacted to spirilis in Nokia 1202 / STE2007 skeleton driver   
    Got the code up here now:
     
    https://github.com/spirilis/msp1202
  17. Like
    larsie got a reaction from RobG in PCBA at Seeed with MSP430?   
    Thanks Rob. I tried Elecrow as you suggested. Really nice results. Boards came to about 10 USD per board, with components, dhl shipping etc, when making 10 boards. Quite a lot of small components, connectors etc, so I think it's a good price. They also soldered 0402 components very nicely. 
  18. Like
    larsie reacted to RobG in PCBA at Seeed with MSP430?   
    Do you know about Elecrow's part sourcing and assembly?
  19. Like
    larsie got a reaction from roadrunner84 in PCBA at Seeed with MSP430?   
    Hi. This might be the wrong place in the forum to put this question, but since many of us are using Seeed to make PCBs, I wonder if any of you have tried their new PCBA service, where they populate the prototype boards with common components. It unfortunately doesn't include MSP430 devices, Maybe if there was sufficient interest from the community, they would add some of the msp430 devices? I would suggest MSP430G2553 20 and 28 pin... 
     
    This is the link to the service: http://www.seeedstudio.com/service/
     
    I just spent 3 hours soldering on small components last night, so I think I'll try this next time. 
     
  20. Like
    larsie reacted to spirilis in 43oh Nokia 1202 LCD Display BoosterPack   
    Pics of the boosterpack all built out-
     
     

    Used hot glue to secure the LCD.
     

    Wasn't too bad.  The pads used for the transistor's resistors and the switch-debounce resistors are close enough for 0603 but large enough for 1206... barely (need some flux to make the solder reflow up around the pads) but it works.  Probably ideal for 0805.
     
    Managed to take a 1x3 right-angle PTH header and bend it into a right-angle SMD header and use that for the SPI MOSI.  Very nice having it that way (good call @@mbeals !).  I opted to forego the backlight-ON header (mainly cause I couldn't repeat the PTH-rightangle to SMD-rightangle trick again without destroying a 1x2 header set) but no biggie, P2.5 still does the trick.
     
    I like having P2.3-P2.5 used for this since P2.0-P2.2 is used by default for my Nordic boosterpack and probably others.  Should stack up cleanly.
     
    Verifying it works in USCI mode with a G2553 and the test_terminal.c from the terminal/ subdir of my msp1202 library -- https://github.com/spirilis/msp1202

     
    I did find that the contrast is a bit heavier on this one, though that has nothing to do with the board and everything to do with the LCD.  Every one's gonna be different I guess.  I manually added a call to ste2007_contrast(8); to lower the contrast (default is 16, range is 0-31)
     
    Code for that:
    #include <msp430.h> #include <stdint.h> #include "chargen.h" #include "usci_spi.h" int main() { WDTCTL = WDTPW | WDTHOLD; DCOCTL = CALDCO_16MHZ; BCSCTL1 = CALBC1_16MHZ; BCSCTL2 = DIVS_1; // SMCLK = DCO/2 (8MHz) //__delay_cycles(8000); // Short delay to let the LCD wake up -- turns out this isn't necessary // Chip select P2DIR |= BIT0; P2OUT |= BIT0; // Drive it high to disable LCD // Backlight P2DIR |= BIT5; P2OUT |= BIT5; // Turn on backlight spi_init(); msp1202_init(); ste2007_contrast(8); msp1202_puts("Hi there my\n"); msp1202_puts("name is Eric.\n"); msp1202_move(8, 0); while(1) { __delay_cycles(16000000); msp1202_puts("txt 1"); __delay_cycles(16000000); msp1202_puts("txt 2"); } LPM4; return 0; } void test_chipselect(uint8_t onoff) { P2OUT = (P2OUT & ~BIT0) | (onoff & 0x01); }
  21. Like
    larsie reacted to jazz in USB Problem   
    AFAIK on TI dev boards 24 MHz XT2 is used, and you are using 4 MHz, and this is not the same thing, because in this case USB PLL configuration is wrong. You must replace in your source code USBPLL_SETCLK_24_0 with USBPLL_SETCLK_4_0 if you want to run it on your board with 4 MHz XT2. Also, all TI examples are prepared by default to MSP430F5529 target with 24 MHz XT2, so they will not work with your board.

    Here is attached my freq meter firmware for 4 MHz target board, so you can try it. Do it as I suggested in last post, by using target board USB supply (+5V / GND) as input of your external regulator.
     
    fm.rar
  22. Like
    larsie reacted to jazz in MSP430F550x based frequency meter   
    I made simple frequency meter with basic MSP430F550x board without any other parts. Only 24MHz XT2 is used. XT1 is not used, but it can stay on board, no problem. Firmware size is 1.5 kB, and it is starting from $E000, so it will work with any MSP430F550x familly member. Measuring pin is TA1CLK, sequence takes 1 second, and resolution is 1 Hz.
     
    Don't have some precize clock source for calibration, so I used for checking PCM2707 3.3V USB to I2S audio bridge that I have on hand. By default word select frequency is 48 kHz, and clock is 64 * 48 kHz =  3.072 MHz.
     
    For calibration use presize MHz clock. First byte in firmware file (default $7D), at location $E000 is used for calibration. If mesuring result is lower than real value, increase calibration byte value, and opposite. The Best way is to change calibration byte value by one (not +/- 10) with each step.
     
    When board is pluged to USB port it will be enumerated as CDC (virtual serial port), and measured results will be displayed by any terminal tool (Hyper Terminal for Win32).
     
    Measuring results with measuring pin connected to ground:
    [3] 0 Hz [4] 0 Hz [5] 0 Hz Measuring results with measuring pin connected to 48 kHz:
    [33] 48000 Hz [34] 48000 Hz [35] 47999 Hz [36] 48000 Hz [37] 48000 Hz Measuring results with measuring pin connected to 3.072 MHz:
    [53] 3071997 Hz [54] 3071998 Hz [55] 3071998 Hz [56] 3071997 Hz [57] 3071995 Hz [58] 3071995 Hz [59] 3071995 Hz [60] 3071995 Hz [61] 3071995 Hz [62] 3071995 Hz [63] 3071995 Hz [64] 3071995 Hz [65] 3071997 Hz [66] 3071996 Hz Firmware: fm.zip
  23. Like
    larsie reacted to jazz in USB Problem   
    Your problem for sure is not in crossed +/- lines, or/and ESD protection chip, because my p2p DIY board (http://forum.43oh.com/topic/2775-msp430-usb-benchmark) have much bigger problems (regarding layout), and works OK.
     
    Are you using internal LDO? Post here complete schematic with power lines connection.
     
    I hope that you have RESET/BSL buttons on board. Try to flash it with USB BSL generic code examples (P1.0 blink) prepared for MSP430F5529, to see if it will be enumerated right with BSL entry.
     

     
     
    1 Meg resistor is used to not have (some kind of) floating state on DP/PUR pin. It is present on TI USB schematic but it is not used (NA marked on schematics). I don't use it.
  24. Like
    larsie reacted to JWoodrell in USB Problem   
    what is the purpose of the 1 Meg the resistor going to ground... .
     
    if its a low volume board, you could move the connector to the back of the board, and take both signals through with vias so they wouldn't have to cross
     
    also the soldering on those QFN is notorious for bad connections, try more flux, and reflow?
     
    if windows is throwing the error message then atleast it is seeing the pullup resistor,  do you have an oscilloscope to look at the waveforms with?
  25. Like
    larsie reacted to jazz in USB Problem   
    I hope that you are using 24 MHz XT2, same like on TI developer board.

    Don't know if you already tried, some simple example (not related to USB) like toggling P1.0. If you didn't, try it, just to be sure that it's working at all. And I mean stand alone, without Launchpad (power supply or whatever) connection. So flash target board with P1.0 toggle firmware. Disconnect it from Launchpad, and connect it to external supply. Turn power on, and check. If you don't have firmware on hand here is my testing example.
     
    sbw_test_32.rar
     
    If this is working OK, try something related to XT2, for example "MSP430F55xx_UCS_08.c" from "slac300 MSP430F552x C Examples". On the same way like with toggle example, stand alone, with disconnect launchpad after programming.

    If there is no problem with XT2, you can start with USB testing. Made test with "buss powered" like configuration. Flash target device with firmware, and disconnect Launchpad. You are not using internal LDO, so there is no connection to VUSB pin? If there is no connection to VUSB pin, and all DVCC/AVCC chip pins connected together, just connect your external 3.3V supply to DVCC/AVCC. Let's make external supply to be synchronized on power-up. Connect external LDO input lines to (5V/GND) VBUS/VSSU lines on target chip. Now, device will act like buss-powered even external LDO is used. You can test it with my frequency meter (http://forum.43oh.com/topic/3317-msp430f550x-based-frequency-meter). It should work, at least enumeration.

    If everything is working, you can try BSL. Just press RESET and BSL together. First release RESET, and after this BSL. There is no need to connect/disconnect USB cable. BSL switch must be between 3.3V line (AVCC/DVCC) and PUR pin over 100R. There must be 1k4 between PUR and DP pin.
×
×
  • Create New...