roadrunner84

Members
  • Content count

    1,370
  • Joined

  • Last visited

  • Days Won

    33

roadrunner84 last won the day on September 16 2016

roadrunner84 had the most liked content!

About roadrunner84

  • Rank
    Level 4

Profile Information

  • Gender
    Male
  • Location
    Eindhoven, the Netherlands

Recent Profile Visitors

327 profile views
  1. Energia stores strings to be sent over serial in a buffer and sends them after running an iteration through loop(). Best thing to do is stop using LPM4 (which kills off every clock domain) and see if things work. Then, if things work, try using LPM1, then LPM3, not LPM4. If you still have issues, the quickest solution is to delay a while after sending things over serial to make sure it's sent before going to low power mode. The problem with your reprogramming of the chip (I assume you're trying to update the programmer, not the msp430 itself) is you're using Windows 9, which has never been released for consumers. Try either upgrading to Windows 10 or downgrading to Windows 7. If that doesn't work, try to reinstall the drivers or using a different USB port.
  2. There is nothing indicating the TI compiler will be phased out. But with the plethora of ARM compilers available, I can imagine TI stopping support for their compiler and focus effort elsewhere. I don't think compilers are TI's core business, nor are software packages. A lot of MCU vendors now provide peripheral setup utilities (like TI's Grace or ST's Cube) and IDEs for free; it's a complementary service for using their MCUs. Pure compiler vendors charge you for their environment of course, since it's their business model. They need to put all effort in providing a better development experience or easier code generation or better libraries than their competitors, not something TI should (IMO) focus on. TI is a hardware vendor; they build the best analog and radio chips they can, as well as a huge range of analogs complemented with a nice collection of MCUs and CPUs. That is where their focus is, not on tools to use those things.
  3. //#include <msp430.h> #include <msp430g2553.h> /* * main.c */ void main(void) { //int adcValue; WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer //This is ADC10 control register //4th bit turns on ADC //11 and 12 sets "16
  4. lwip has fairly nice layers, you should be able to send raw ethernet packets using ethernet_output() as defines in netif/ethernet.h
  5. I do agree that code should be readable. Bet then again, there's a trade off between readable low-level code and readable business logic. I'd much rather see some unclear macros or templates to allow me to use cleaner calls in my "real" program, than have a murky program that reads like a book. Things like set_pin_as_output() and set_high() are quite clear in their intention, it's okay to take a while to understand their inner workings, as long as the code using it is more readable thanks to using them.
  6. You could consider using C++ template programming instead of C style defines. I haven't tested this, but it would go something like this: template <int port> void GPIO_IS_INPUT(int pin) { GPIO_SEL(port) &= ~(pin); GPIO_DIR(port) &= ~(pin); } template <> void GPIO_IS_INPUT<J>(int pin) { GPIO_DIR(J) &= ~(pin); } Now instead of passing port as a macro like function parameter, pass it as a template parameter GPIO_IS_INPUT<LED1_PORT>(LED1_PIN); I'm not entirely sure this will work though; the double-hash preprocessor operator is very tricky. You could go all the way with these templates and get gone with the macros entirely. If you really want no function call overhead, just make them inline.
  7. I condensed the comment in the referral in the referral from @@LiviuM their post. It boils down to two things to check: Call Wire.setModule(0) just before Wire.begin() Remove the jumper for LED2 (P1.6) next to S2
  8. Javascript is a very nice language, I see no reason to say Python has a place on an embedded system, but Javascript doesn't. Both of them are high level languages which offer great flexibility. I do agree both are quite heavy and for dedicated solutions I'd urge using C++ over Python/Javascript, but I think it's the most elegant solution over a self-made scripting language for things like home automation.
  9. First of all, I2C has this oddity of using 7 bit addresses. When representing 7 bits in an 8 bit byte, it's never clear where to add the extra zero bit. Your device address is 1001xxx But does this translate to 01010xxx or to 1010xxx0 try using 89h instead of A2h, it might just work. Next thing, when writing 16 bit values over an 8 bit bus, make sure you have thew byte order (also called endianness) correct. Does 00FFh 0000000011111111 translate to 00h, FFh 00000000 11111111 or to FFh, 00h 11111111 00000000 so you could try either (or read back both addresses).
  10. I made this exact setup a few years back. I actually used two buttons and two LEDs, and I embedded it in a toy kitchen. If I remember correctly, I used an msp430g2230 for the task, that's an 8 pin msp430. I did not use Energia for this project, but IAR, similar to CCS. There were some extra features, for example the LEDs were pulsed, and the pulses of the LEDs were 180 out of phase as to load the battery as evenly as possible. I used both LPM3 and LPM4 for this task; while an LED was on, I went to LPM3 to allow a timer to keep running. Then when the timer expired (and thus the LEDs are turned off) I go to LPM4 which should use about 200nA on that processor. I don't know if it is really that low, I don't own a nanoamp meter.
  11. No it doesn't. It does have a dual serial interface, but only one can be set to UART, the other can be set to I2C, both can be set as SPI.
  12. @@Fmilburn Nice wearable pcb! Would you consider replacing the 6-pin header with the 0.05" 4 pin header, or maybe even a tagconnect? then it would be even better looking and less susceptible to getting stuck to clothing with the header. You might even squeeze in one or two extra pads!
  13. It looks like you're using software serial, but try to initialize your GPS module using hardware serial. Should the setup not call nss.write() all the time, instead of Serial.write()?
  14. I was talking about OOK (on-off keying), while your latest schematic is talking about FSK (frequency shift keying). The difference is that FSK will send one frequency for high bits and another for low bits, while OOK will send one frequency for high bits and no frequency (DC, 0Hz) for low bits (or the other way around). So FSK has the added value of distinguishing high/low bits from an idle line. In the case of UART serial, you don't need this detection per se, because a high bit and an idle line are not distinguishable anyway. Then again, if you have the software to do FSK, just use it. If you make things from scratch, OOK might prove simpler to implement.