Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Reputation Activity

  1. Like
    tripwire reacted to B@tto in Energy Trace issue   
    All I have done here was in Energia in CCS, but I imagine I would be the same ...
    When I worked on porting CC430 playing with ez430 Chronos kit, I had in Energia standAlone nearly the same consumption that TI mentionned in th user guide.
    But on my module I fought a day to find where are the leaks of current (
  2. Like
    tripwire reacted to RobertWoodruff in Why is the delay needed for reading from response from HC-05 over UART on a Launchpad 1.5?   
    Believe I have this figured out.
    It is the CSS debugger that interferes with the ISR routines. When the debugger is sitting at a breakpoint it keeps the ISRs from firing as expected which has the effect of causing input to the UART RX channel to appear to fall in the bit bucket. Not unexpected really by virtue of the way the debugger works.
    The delay() call gave the IRS routines time to absorb all the responses before the debugger break point was reached. That is good news really, Because now we know that UART input continues to be accepted even when a delay() call is active.
    So be careful when attempting to use debugger break points about the time the UART ISR routines might be firing. They will be disabled and input will get lost.
    Otherwise the input from the HC-05 is coming in as expected on the UART RX channel.
    Very cool!
  3. Like
    tripwire reacted to energia in Why is the delay needed for reading from response from HC-05 over UART on a Launchpad 1.5?   
    Note that serialEvent() is not executed in ISR context. What happens is that main() calls a function serialEventRun(). This function then calls Serial.available() to check if any characters are available. If they are it will call your serialEvent(). 
    A quick "dirty" work-around to demonstrate that all char are recieved would to check if cmdBufferOffset == 4. If it is then you got the entire string you where expecting. As @@chicken mentioned, it is better to check for "\r\n" to make sure you got the response.
    char cmdBuffer[128]; int cmdBufferOffset; int AT_PIN = P1_3; void setup() { cmdBufferOffset = 0; /* * Init the BT device */ Serial.begin(9600); pinMode(AT_PIN, OUTPUT); digitalWrite(AT_PIN, HIGH); delay(500); // Time to reach AT mode Serial.write("AT\r\n"); // delay(500); // *** WHY IS THIS NEEDED ? **** } void loop() { if(cmdBufferOffset == 4) { Serial.print(cmdBuffer); cmdBufferOffset = 0; } } /* * From BT device on UART */ void serialEvent(void) { while(Serial.available()) { int cInt = Serial.read(); cmdBuffer[cmdBufferOffset++] = (char)cInt; } }
  4. Like
    tripwire reacted to chicken in Why is the delay needed for reading from response from HC-05 over UART on a Launchpad 1.5?   
    With the delay, all the characters of the response were received by the MCU and waiting in a buffer before you read it.
    Serial communication is not instantaneous. At 9600 baud, the 4 characters will take about 4ms to be transmitted. Add to that the time it takes to actually send the command and the time for the Bluetooth module to process your command and you quickly get to a few 100ms.
    You should check for the end of line to ensure you received the complete response.
  5. Like
    tripwire reacted to dubnet in Error communicating EnergyTrace pod. How do I use Energy Trace?   
    A quick search on the site revealed this:  http://43oh.com/2015/09/how-to-measure-an-energia-applications-power-usage-with-energytrace/
  6. Like
    tripwire reacted to chicken in Products using MSP430   
    Philips Hue Tap, a wireless light switch without battery, featuring a MSP430FR5730

    Teardown by Adafruit, with the MSP430 discovered at the 15 minute mark.
    This device doesn't have a battery, but uses a mechanical, relais-like component to generate power when the user pushes buttons.

  7. Like
    tripwire reacted to Clavier in Have feedback for TI? Please share here.   
    No; the driverlib does not abstract away the differences between the peripherals. For example, you don't have a single SPI API, you have functions for USCI_A_SPI, USCI_B_SPI, EUSCI_A_SPI, and EUSCI_B_SPI. Similarly for Timer_A, Timer_B.
    The TI documentation says that the drivers "provide a mechanism that makes it easy to use the device
  8. Like
    tripwire reacted to GrumpyOldPizza in Have feedback for TI? Please share here.   
    What you are suggesting is more higher level than driverLib, which IMHO is a macro wrapper layer around the device registers. 
    The problem with such an approach is that coming up with a good abstraction is very hard. There is no real good one-size-fits-all. A good example is ST's HAL (CubeL4 for example). It assumes some higher level locking that a RTOS could supply. The problem is that if you want to use part of the code in both the ISR and the Task/Threads, this will fall apart, and ... well ... you need something different. The Arduino abstraction is nice, but falls short on asynchronous operations. 
    The best I have seen up to now (but admittedly not used) is Nordic Semi's SDK for nRF5, which splits up things into a HAL and into a driver layer.
  9. Like
    tripwire reacted to USWaterRockets in Have feedback for TI? Please share here.   
    The biggest flaw with standardizing on an Arduino Driver lib is precisely because it encourages people to NOT learn about the underlying hardware. As soon as they try to connect up a peripheral with a subtle difference, they get completely frustrated and complain about the lack of support for their particular sensor or application. Not everyone is like this, but it is a generalization of a broad swath of Arduino users.
    There's nothing wrong with learning how I2C works, or how a PWM works. Once you know how they work on one micro, then you understand the fundamentals enough to code the same thing on totally different hardware.
  10. Like
    tripwire reacted to Fmilburn in WiFi Sous Vide Sources   
    Hi @@beniopas and welcome to 43oh
    I made this one quite some time ago but did not document the build. It is simple enough though. I put it in a weatherproof outdoor enclosure with a 2x16 LCD for that old school industrial look. All the holes and cuts were made with a drill press, rotary tool, and a file to clean things up. The temperature sensor (DS18B20) is inside a whisk from the dollar store to hold it away from the wall of the crock pot and food being cooked since I thought this would give a better indication of the bath temperature. I didn't implement WiFi. I played with the PID code quite a bit and tried some different control schemes for the educational value. The buttons are used to set the temperature and select the control method. Works great - there are lots of tutorials on how to do this but adding your own twist is the fun part of it.
    Edit: see this post also https://e2e.ti.com/group/launchyourdesign/b/blog/archive/2014/12/24/launchpad-brings-the-heat-to-fine-dining
  11. Like
    tripwire reacted to TI_Trey in WiFi Sous Vide Sources   
    Hi 43oh,
    Last month I posted the sources for the solid state relay board, and I promised I'd post the source code for the sous vide application.  Well here it is!
    You'll also need the standard PID and PID autotune libraries available on your favorite Arduino site.
    I just celebrated my birthday and cooked a surf and turf with it.  As you can see, it works pretty well:

    Happy Holidays!
  12. Like
    tripwire reacted to chicken in Need help understanding this code   
    @@ak96 Nothing wrong with preferring bare metal, my preference as well
    Take a look at the innards of the counter library, even if you don't plan to use Energia. It basically sets up a timer to count up when a pin changes from 0 to 1. Using the timer, you don't need an interrupt for the counting itself.
    The source code of the library may look a bit cryptic, because it tries to accommodate many different MSP430s. The gist is:
    1. Set GPIO pin as input and select it's function (PxSEL) as timer input. The timer input (TxxCLK) is only available on a few pins, consult your MCUs datasheet.
    2. Configure timer for external clock and continuous mode
    3. Functions to start, stop and reset the timer as well as reading out the current timer value.
    Run the timer for a known time, and the number of pulses will allow to determine the rate.
    That being said, not sure if that's the best approach for a heart rate monitor. Measuring the time between pulses might be more sensible:
    1. Start the timer, driven by one of the MSP's internal clocks. Use a divider to avoid overflowing the 16bit timer for the expected heart rate.
    2. Wait for a pulse on a pin. A busy loop reading the pin is probably good enough for a beginner project.
    3. When a pulse arrives, read the timer value.
    4. Calculate the rate using clock frequency, timer divider and measured timer value.
    I don't know what output signal heart rate monitors provide. If it's an analog wave form, you may need some circuitry to convert it to something that is usable for digital inputs and/or use the built-in comparator or ADC peripherals. 
  13. Like
    tripwire reacted to cubeberg in Need help understanding this code   
    At least in the MSP430 line, each mcu family has a bunch of examples that go with it.  If you're looking to go lower level than Energia (I prefer code composer for MSP430 as it's a pretty simple chip) - there are some great examples there.  There should be some timer examples - which allow you to count the number of ticks between events.  They also come with comments at the top of the file that explain what it does.  
    http://www.ti.com/product/MSP430G2553/toolssoftware#softTools - download the "Code Examples".
  14. Like
    tripwire reacted to chicken in Need help understanding this code   
    The code in main.txt sets up interrupts that are triggered when pins change from high to low (falling edge). A counter J is increased by some of these interrupts.
    That being said, the code has quite a few issues. If this is not your code, I would look for a better example as this one will cause a lot of grief to get working. If it is your code, I suggest to first think about the structure of the program before reattempting the implementation.
    A few issues:
    - the variable j used by the interrupt routine to keep track of the pulses should be declared as volatile.
    - the setup of interrupts that configure interrupts is very convoluted and without further documentation, it will be hard to figure out how they interact and how the program is supposed to work
    - there are several interrupt routines that include printing out of date, this is bad practice and almost certainly will create issues.
  15. Like
    tripwire reacted to Fmilburn in MSP 432 Analog pin 9 mapped to Analog pin 8   
    Hi @@zico
    The following is from the MSP432 quick start guide pin map...
    A8 is P4.5 and located on pin 27 of the LaunchPad
    A9 is P4.4 and located on pin 26 of the LaunchPad
    I think I got that right but haven't tried it yet but will do so when I get a moment.  You can either change pins_energia.h to the above or refer to pin 26 in Energia to get A9.  Pins are numbered like this on the LaunchPad (the starting and ending numbers are shown at the top and bottom of the headers):
    1    21              40  20
    2    22              39  19
    8    28              33  13
    9    29              32  12
    10  30              31  11
    I will file a github request if I can confirm the error and fix.
    Edit:  Confirmed that specifying pin 26 works.  But has pins_energia.h been moved (or removed) in V17?   Filed on github as issue #879
    Edit:  pins_energia.h is located in \hardware\emt\ti\runtime\wiring\msp432\variants\MSP_EXP432P401R.  Confirmed that pins_energia.h is wrong.  Change
    static const uint8_t A9 = 27 to
    static const uint8_t A9 = 26
  16. Like
    tripwire reacted to zico in MSP 432 Analog pin 9 mapped to Analog pin 8   
    I am Using Energia 17 on TI MSP432 (Windows 7 PC):
    analogRead works for all the Analog pins except for A9. Initially, I thought that I must have just damaged the Analog port, but I have since tried this on numerous boards and they are all the same. Basically A9 is tied to A8, so whatever A8 is reading can also be read through A9. When I check the pins.h file, both A8 & A9 are mapped to "27", but I don't know what this "27" refers to or what the correct number should be for A9. If anyone knows how to find out the correct pin to use and how to modify it, please let me know.
    Thanks very much,
  17. Like
    tripwire reacted to Fmilburn in Have feedback for TI? Please share here.   
    Here is something I hope we continue to see on all LaunchPads....  The MSP432 has nice large mounting holes on corners. It makes it really easy to mount or just to put standoffs in the corners for a stability and to keep it off the desk.  Providing the standoffs like was done on the FR6989 is even better.

  18. Like
    tripwire reacted to Clavier in Have feedback for TI? Please share here.   
    Of all the components in an MCU, only the CPU itself is hidden by the compiler; changing anything else would not be portable.
    By combining an ARM CPU with the MSP430 peripherals, they allow existing MSP430 program(mer)s to use a faster CPU, without having to do much porting.
    The MSP432 is useful for somebody coming from MSP430, not from any other ARM.
  19. Like
    tripwire reacted to Rickta59 in Flow Chart Template   
    We are all dating ourselves by responding to this post : )...
    This is the one I remember:

    I also have a metal ruler that was used for laying out formats for an IBM line printer.
  20. Like
    tripwire reacted to spirilis in cc3200 injects noise to my thermocouple reading   
    Does the thermocouple lines have a 10nF (0.01uF) capacitor across them close to the AD8495? (or any other kind of filtering)
    Does the AD8495 have proper bypass capacitors across its Vcc/GND?
    Might be induced by momentary power drops in Vcc too... how is the board being powered?
  21. Like
    tripwire reacted to chicken in cc3200 injects noise to my thermocouple reading   
    The noise you see probably correlates with packets sent over WiFi. Even if your application doesn't send anything, the CC3200 will occasionally send a packet to maintain a WiFi connection.
    I can see three possible reasons:
    1. the thermocouple acts as WiFi antenna
    2. the trace between the amplifier and the CC3200 acts as WiFi antenna
    3. noise and/or voltage drop on the power rail when the CC3200 transmits
    Given that the AD8495 is a differential amplifier, we probably can rule out #1
    If #2 is the culprit, you could add a low-pass filter to that connection. As simple RC filter that filters anything above a few KHz would probably work. E.g. 100 ohm in series and a 0.1-1 uF capacitor to ground. http://www.learningaboutelectronics.com/Articles/Low-pass-filter-calculator.php#answer1
    If it's #3 make sure that you properly decoupled the power rail of the amplifier. The application note suggests 0.1 uF and 10 uF capacitors. Make sure they are placed close to the amplifier.
  22. Like
    tripwire reacted to dubnet in Analog Devices RF Detector Kit offer for $5   
    Agreed $9 would have been reasonable for a two pound package. However, it was $16.
  23. Like
    tripwire reacted to hmjswt in Flow Chart Template   
    Oh, that brings back so much memories.
    I used to program in FORTRAN. And still do.
    Here is my Flowchart template.

  24. Like
    tripwire reacted to Fmilburn in Flow Chart Template   
    I have been working on a project lately where I need to fit a design into an enclosure and was fumbling through my drawer looking for a measuring scale when I came across an old flow charting template.  I acquired it almost 40 years ago when I was working on a hydrocarbon process simulator that we were programing in FORTRAN.  That project was the last time I wrote code until fairly recently, but anyway, here is the template:

    Pretty funny...  On the left side is a "card scale" that you could put next to a stack of IBM punched cards to estimate how many you had.  Over at top right are the main ways of getting something into the computer - punched card, magnetic tape, and punched tape.  I actually remember using punched paper tape on a computer once.  Down below is online storage, offline storage, and "drum".  Followed by document, display, terminal, and manual operation.
    I don't actually remember using it as we weren't required to document with flow charts.  But we did have extensive user documentation in the form of paper manuals and the code itself was heavily documented.
  25. Like
    tripwire reacted to dubnet in Analog Devices RF Detector Kit offer for $5   
    I did order two, hesitated at the unknown shipping charges but proceeded thinking domestic ground shipping on less than a pound shouldn't be much. Bad assumption. The shipping weight was actually 2 pounds due to the marketing material included (at my expense) in each board's box. Long story short...the $5 boards ended up costing just under $14 each. I won't be using RichardsonRFPD again.
    You were wise to abort.
  • Create New...