Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Reputation Activity

  1. Like
    abecedarian reacted to tml in Simple MSP430F5529 bootloader   
    I have spent quite a significant amount of time to figure out how and then write a simple bootloader for MSP430F5529 that I would like to share with you.

    It was written for mspgcc (4.6.3) and uses small memory model; for accessing high flash (20-bit addressed) I use some simple assembler inlines. It won't work out of the box in CCS.

    This project is fully functional and I use it to remotely reflash my weather station (https://plus.google.com/u/0/photos/102121325118286323880/albums/5936572393229426625?authkey=CJ3N8Y2CtJiOIQ). I just push the new application image onto the web server, then the application working on the target device downloads it, parses and puts onto the flash and then lets the bootloader do the rest of the work.

    The methods used for reflashing are kinda primitive (e.g. word access, while the block write would be way more efficient), anyway, I had to have this up and running in reasonable time.
    I think making the code CCS-compatibile is not a big deal, the main part is flash access enclosed in flash.c. Moving code to RAM is even simpler in CCS with LOAD and RUN directives.

    Anyway, any issue reports and comments are welcome!

    repo url: https://bitbucket.org/eltomek/msp430bootloader

    Best Regards,
    EDIT: fixed the link to the repo.
  2. Like
    abecedarian reacted to OppaErich in $4 Cypress Cortex-M0 boards   
    Not TI but we all love cheap stuff. Very small USB-PCB-Plug format.
  3. Like
    abecedarian got a reaction from GeekDoc in RandomElectrons LP10062   
    Personally, I think you should look at this like it could be a game controller, where the BP headers are oriented parallel to the short sides instead of the long. Imagine 8 position joysticks left and right of the capsense BP or something like an NES controller. F5529 could even enumerate as an HID and expose those to the computer.

    like this (not to scale): /------------------------------------------------------------------------\ |0 [PWR / USB / SBW on bottom] 0| | | | oo oo | | oo +----------+ oo | | oo | MSP 430 | oo | | oo | | oo | | oo | goes | oo | | oo | | oo | | x oo | here | oo x | | | oo | | oo | | | x--+--x oo +----------+ oo x--+--x | | | oo oo | | | x x | |0 0| \------------------------------------------------------------------------/Just a thought.
  4. Like
    abecedarian reacted to RobG in Eagle Lib part request   
    Here you go (just double check before sending off to fab.)
    Make sure to put 6-9 thermal vias under the heat pad and remove solder mask on both sides (approx. 0.175" x 0.175")
  5. Like
    abecedarian reacted to simpleavr in TMS0803/5 Emulating Calculator Build   
    I am attaching the original PCB image here, and a revised PCB that I am going to order.
    The new PCB has less buttons, and I added a bypass capacitor. Plus it can fill another type of CR2032 cell holder (I want to use the lower profile ones).

  6. Like
    abecedarian reacted to roadrunner84 in I'm using MSP430 EXP-G2   
    Short answer: No
    Long answer: You do not show any effort to let us jump on your train of thinking. You write posts consisting of a single line (with terrible spelling).
    So far I know you want to use an MSP430 to measure some thing current-y and you are using an existing application (or template) that throws you messages.
    I had to read three topics to combine this, summing up to 10 posts.
    Please, we're glad to help, but you don't make it possible for us to actually help you.
    What is your situation? Do you have a schematic or protocol description of the things you're interfacing with?
    What have you tried thus far? What did work, what did not, what had you expected, did your results agree with that?
    Where do you get stuck? What is the problem in that stuck point? How can we help there?
  7. Like
    abecedarian reacted to energia in TM4C1294XL Connected Launchpad Ethernet Port Pins   
    The TM4C1294NCPDT features a MAC/PHY. The communication to the MAC is through registers directly. There are no physical pins involved other than the pins connected to the Ethernet transformer but these are dedicated pins and not GPIO's/SPI.
  8. Like
    abecedarian reacted to cubeberg in MPU6050 with MSP430G2launchpad   
    Do you have pull-up resistors on the i2c lines?  I was trying an i2c library for Energia and forgot pull-up resistors to a similar result.  Adding the resistors fixed everything.
  9. Like
    abecedarian reacted to bobnova in My first attempt TM4C129   
    I don't know if you're still around or not, but I got a IoT launchpad a couple days ago and have been having similar issues with a webserver program based heavily on the demo/example program in Energia (BarometicPressureWebServer), which uses the same core code as in the original post of this thread.
    With possibly excessive use of Serial and LED debugging, I think I found the problem.
    If I'm correct, it's due to the while loop.
    It calls
    while (client.connected()) { if (client.available()) { and then goes on and does things.
    The break; statement that ends that while is inside the if (client.available). If the client never sends anything, or if the Launchpad misses it, client.available() never returns true, the IF never happens, and the break; statement never happens either. Leaving you stuck in the while loop for all eternity.
    I've been banging my head against this issue for a couple days, and finally figured out the above. I put in a timeout to kill the connection (call break; and let it trundle off to client.stop()) after 1000ms.
    void listenForEthernetClients() {   // listen for incoming clients   boolean activeConnection = false;   EthernetClient client = server.available();   if (client) {     Serial.println("Got a client");     // an http request ends with a blank line     boolean currentLineIsBlank = true;     char c;          while (client.connected()) {       if (!activeConnection){         connectionActiveTimer = millis();         activeConnection = true;       }              if (activeConnection && connectionActiveTimer + connectionTimeout < millis()){         break;       }                if (client.available()) { I've seen it hang in the while loop for a second and then reset and start working again, which leads me to believe that I've found and fixed the problem.
    Bug in the demo problem rather than a bug with Ethernet or the IoT.
    As a note, I'm absolutely loving the board and Energia support for it. Without Energia I'd be completely lost trying to do anything with this board.
  10. Like
    abecedarian reacted to bobnova in My first attempt TM4C129   
    I'll certainly try! I
    Never done anything on github but download, so I'll need to make an account and such.
    I'll see what I can do.
  11. Like
    abecedarian reacted to Rei Vilo in My first attempt TM4C129   
    Nice catch!
    Would you mind committing the correct code to the Energia GitHub repository and performing a pull-request so that everyone could benefit from it on the next release of Energia?
    Thank you!
  12. Like
    abecedarian reacted to RobG in North Carolina Maker Faire 2014   
    Setup time


  13. Like
    abecedarian reacted to simpleavr in Simulating a TI calculator with crazy 11-bit opcodes   
    Finally moved the emulator to a single PCB design (after one failed PCB design). Now my kids can take them and use them in school.
    Source code can be found at https://github.com/simpleavr/tms0800.
    Source code based on Ken Shirriff and other's work, please see http://righto.com/ti and http://righto.com/sinclair

    A few photos...

    PCB design available upon request.
  14. Like
    abecedarian reacted to cubeberg in 43oh badge   
    This project was a collaboration with Texas Instruments.  I've kept it hush-hush so far, but as of yesterday - it's finally out in the wild!  Yesterday at the SF Maker Faire, Texas Instruments started giving away boards at their booth.  If you're visiting the Maker Faire today - please drop by booth 220!
    Thanks a ton to TI for sponsoring and feedback on the design.  Will Cooper, Adrian Fernandez, Mark Easley, Dung Dang and Rachel Platis were all involved - this wouldn't have happened without them.
    Also - Elecrow did a wonderful job on the boards and initial kitting (I added the batteries and MCU once back in the US).  
    Badge page on 43oh - http://43oh.com/badge/  (drop by this page for more info and an intro video).
    Github with schematics, sample code, etc. : https://github.com/dd430/430RocketBadge
    The board is intended to be easy to solder - parts were kept to a minimum.  It showcases several features of the MSP430G line.  The board has a Cap Touch slider as well as 5 LEDs.  The pre-programmed demo starts in a POV mode.  If you swing the badge in a circle, you'll see the pre-programmed messages written in the air.  My favorite part of the project though - has to be the ability to update the message on the badge via the light sensors on the board.  You may have seen similar projects.  One sensor is used for the clock, another for the data.  A simple web page allows design of a message and then uses two squares on the page to trigger high/low values on the light sensors.  You can find it at the 43oh badge page above.
    All in all - we were able to get 500 kits created.  Hopefully these will be given away at events that TI is attending for quite a while.  I'll post back if I hear they're going to show up for an event.  Hopefully we'll also have a few to give away to forum members as well.  
    BTW - I will say - creating 500 kits of something is a significantly different endeavor than just a handful
    Boards after manufacture:

    500 kits arrived at my house:

    I started with several ideas for the board initially - but we ultimately ended with the POV design.  V1 of the design used a shift register to control the LEDs and took significantly longer to solder.  Not the best for a beginner kit  Not to mention getting the clock working with the shift register was a bit squirly for some reason.
    V1 badge vs V2

  15. Like
    abecedarian reacted to esteimle in Alternatives to MSP430FET   
    Well I hooked it up and it loaded my code just fine, I was also able to set software breakpoints and single step so this was a nice solution.   Thanks again for the advice everyone!
  16. Like
    abecedarian got a reaction from bluehash in [POTM] dAISy - A Simple AIS Receiver   
    Oh... like these?

  17. Like
    abecedarian reacted to jpnorair in Adding CC430 support   
    Cool.  The stock Chronos 433 antenna is absolute rubbish, though, so it is a low bar.
    In any case, I can mail you a hand-built ~5cm reference monopole, if you want to compare RSSI readings (send me a PM).  I have tons of these, which I manufacture in the lab.  Normally I don't offer this sort of thing, but you are actually working on something that is of interest to me.  The same offer goes towards anyone doing 433 MHz Chronos work, or for that matter CC430, CC11xx, and CC1200 work.
    It's also important to mention that a single-ended antenna (monopole) needs a decent-sized ground plane to work properly.  The Chronos doesn't offer this, but if it is plugged-in to a USB cable or some other path to mains-power, this will serve as an excellent ground (even plugged into a battery powered laptop, smartphone, etc, this is plenty of grounding).  As soon as you remove this ground, the antenna performance will get much worse.  Ideally your ground plane on a monopole configuration has radius of quarter-wave, but if you don't need wide bandwidth you can hack a decent antenna system just by having the perimeter of the ground plane >= half-wave (in this case, you are actually building a dipole).
  18. Like
    abecedarian reacted to superbrew in LCD Demo   
    I have been working on some stuff with RobG's LCD backpack.
    Here is a short demo of my progress making a particle system and displaying a pciture. I know they are unrelated, but there is so much to do!

  19. Like
    abecedarian got a reaction from enl in Magnifying glasses   
    I haven't used it in a while... well since it broke... but the digital camera I had, had a sweet macro lens that could zoom in and make banners out of thermal label prints. And its preview LCD on the back gave about 100x zoom up to about 1/2" from the source.
  20. Like
    abecedarian reacted to spirilis in #138 expression must be a modifiable lvalue main.c   
    I think the gist of it is, while NVIC_EN1 is defined to the memory address of the register, C can't just use numbers like that as "variables" which is what it's trying to do.  It thinks you're just assigning it another constant number, and assigning a value to a constant number makes no reasonable sense.  You can't say 2 = 3, in other words.  You can't say 0xE000E104 = 0x00000010, likewise
    So you have to take that number and "cast" it to something it understands.  TivaWare provides some macros to do this, called HWREG and its siblings.
    HWREG(NVIC_EN1) = 0x00000010;
    might do it.
    From inc/hw_types.h, HWREG is:
    //***************************************************************************** // // Macros for hardware access, both direct and via the bit-band region. // //***************************************************************************** #define HWREG(x) \ (*((volatile uint32_t *)(x))) #define HWREGH(x) \ (*((volatile uint16_t *)(x))) #define HWREGB(x) \ (*((volatile uint8_t *)(x))) #define HWREGBITW(x, \ HWREG(((uint32_t)(x) & 0xF0000000) | 0x02000000 | \ (((uint32_t)(x) & 0x000FFFFF) << 5) | (( << 2)) #define HWREGBITH(x, \ HWREGH(((uint32_t)(x) & 0xF0000000) | 0x02000000 | \ (((uint32_t)(x) & 0x000FFFFF) << 5) | (( << 2)) #define HWREGBITB(x, \ HWREGB(((uint32_t)(x) & 0xF0000000) | 0x02000000 | \ (((uint32_t)(x) & 0x000FFFFF) << 5) | (( << 2)) So HWREG(NVIC_EN1) is actually HWREG(0xE000E104), which is then:
    (*((volatile uint32_t *)(0xE000E104)))
    Peeling back the parentheses...
    (volatile uint32_t *)(0xE000E104) says that the expression "0xE000E104" is actually a volatile pointer to a data structure of type uint32_t (i.e. unsigned 32-bit integer), and as such the C compiler should generate machine (ASM) instructions appropriate for doing 32-bit-word-at-once operations in reference to the data in that variable.
    Encapsulating that with parentheses and then putting a * in front, is like having a pointer whose value you want to reference:
    uint32_t *ptr = &some_other_variable;
    *ptr = 0;  // Set the memory housing "some_other_variable" to 0
    *ptr = 255;  // Set the memory housing "some_other_variable" to 255
    Likewise, (*((volatile uint32_t *)(0xE000E104))) = 0x00000010;
    is saying "Set the 32-bit word defined at memory location 0xE000E104 to 0x00000010" which is what you're looking to do.
    If I'm not mistaken, another way to slice & dice this one is to do something like this:
    volatile uint32_t *nvic_en1_ptr = (void *)NVIC_EN1;  // (void *) just says "this expression is a pointer, not a generic number"
    *nvic_en1_ptr = 0x00000010;
    The use of the keyword "volatile" is important to make the C compiler acknowledge that this is a portion of memory whose contents may change behind the CPU's back at any time, and as such, the C compiler shouldn't get sneaky and try optimizing accesses away by, say, storing its value in a register and manipulating that instead (for improved execution speed), assuming that its register copy will always be valid even when it's not (because the underlying contents of that memory location may change without the CPU's knowledge).
  21. Like
    abecedarian got a reaction from spirilis in Odd glitch using analogWrite with LED's   
    And on an odd note... literally... I can imagine Hawaii 5-0 and Get Smart themes playing against each other.
  22. Like
    abecedarian reacted to spirilis in Odd glitch using analogWrite with LED's   
    Yep, I'll do a high-res 20-second sample sometime today and see what's going on.  Logically in my head I'm not sure how, but, I do see a few "odd" edge cases in the code where weirdness can arise...
  23. Like
    abecedarian reacted to energia in Energia Port Manipulation Or Equivalent?   
    Accessing the port registers on TivaC can be a bit tricky. It's easier use the driverlib. You will get low level access without to much overhead.
    For example, the GPIOWrite function can be used to write directly to a GPIO register setting/clearing multiple bits at a time. For API details see 
    ----------- GPIOPinWrite Writes a value to the specified pin(s).   Prototype:    void    GPIOPinWrite(uint32_t ui32Port,                 uint8_t ui8Pins,                 uint8_t ui8Val) Parameters:     ui32Port is the base address of the GPIO port.      ui8Pins is the bit-packed representation of the pin(s).     ui8Val is the value to write to the pin(s).   Description: Writes the corresponding bit values to the output pin(s) specified by ui8Pins. Writing to a pin configured as an input pin has no effect. The pin(s) are specified using a bit-packed byte, where each bit that is set identifies the pin to be accessed, and where bit 0 of the byte represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on.   Returns: None. -----------
  24. Like
    abecedarian got a reaction from chicken in [POTM] dAISy - A Simple AIS Receiver   
    Oh... like these?

  25. Like
    abecedarian reacted to spirilis in Adafruit 1.2" LED 7-seg Display Backpack - MSP430F5172 edition   
    So a primary project of mine right now is to reinvent my alarm clock.  I have an old POS I probably bought for $10 from a department store over 10 years ago that still works..... for the most part, but its digits are too small for my squinty eyes to see across the bedroom at 3AM when my son likes to wake us up for no good reason.
    Obviously the first line of business here, then, in reinventing an alarm clock is the display.  I like red displays at night, and I like larger digits, so Adafruit's 1.2" red LED display was perfect- http://www.adafruit.com/products/1264
    They sell one with an I2C backpack too (HT16K33-based).  But something just doesn't jive right with me there; I want mine overengineered to the point of exhaustion.  So I designed my own backpack with suitable P-channel and N-channel MOSFET transistors controlled by an MSP430F5172.  Used the F5172 for two reasons: Native 5V on some pins (great for direct control of the P-channel's when powering the LEDs with 5V for maximum brightness & compatibility with different LED colors), and Timer_D should give me an absolutely hideously inappropriate amount of brightness control if I PWM the P-channel FETs using a Timer_D output.
    In any case, board fabricated, my first test revision of the Spy-Bi-Tag for eZ-FET all assembled and my new Tag-Connect TC2030-MCP programming cable in hand (bought last month), I've given it a test.  Just lighting up one thing at a time to make sure all the cathode & anode lines work.
    Looks good so far:

    Don't mind the FuelTank boosterpack, I noticed that my eZ-FET-to-Spy-Bi-Tag adapter didn't offer any options for connecting the 5V or 3.3V rails to the rest of the LaunchPad for sending 5V/3.3V to the project, so I popped on the FT BPak to cover that for now.  In any case, that Spy-Bi-Tag eZ-FET adapter will need at least 1 more revision before I feel it's good enough to publish.  I must say though, the eZ-FET programs the F5172 nice & fast!
    Another thing I noticed is I put the Tag-Connect footprint way too close to the 2x5 power/data IDC connector; I've bent one of the corner pins on the IDC pinout many times trying to get my fingernail in there to pinch the connector legs, although I got it down to a science now so I'm not hurting it anymore.  That said, I'm pretty impressed with the Tag-Connect and the legged version doesn't seem all that hard to install & remove; a bit of effort but nothing horrible IMO, no tools required to be sure (just pinch & pull at the same time to remove).
    This LED Display Backpack offers a 2x5 connector suitable for IDC which has two GND's, 5V, 3.3V, and a number of GPIOs from P1.0-P1.5 for the full USCI experience; choose whatever protocol you want to use to talk to this one!  I'm planning on using UART in my final alarm clock project.  The main brain of the alarm clock will likely be an F5529 LaunchPad, and the mainboard will include enough circuitry to charge two tablets at the same time, or a tablet and a phone, or two phones, or 1 phone or tablet or whatever.  Got samples of TI's TPS2511 for that part of the project.
    Probably going to ignore the RTC's on the MSP430's and use the DS3231 for keeping time, although I might change my mind.
  • Create New...