Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation since 05/24/2018 in all areas

  1. 3 points
    zeke

    One Wire Controller booster

    IT'S ALIVE!!!! I have 104 ds18b20 sensors wired into my board and it is reading them all. I am celebrating! WOO HOO! Now it's time to crush an mqtt server!
  2. 2 points
    zeke

    One Wire Controller booster

    If anyone is curious, I have been developing the edge router app in pyqt5 on linux. Here is one of the better tutorials that I have found on learning PyQt5. Apparently, there are two different sources to get PyQt5 from: PyQt5 from Riverbank Computing, and Qt for Python from Qt.com, which was originally called PySide(2) PyQt5 is a bit of a mind bender at the start, but it gets better as you climb the learning curve.
  3. 2 points
    NurseBob

    Energia.core

    I've had intermittent problems with various versions of CCS and Energia in the past. After seeing your post I updated my CCS to 7.4.0.00015 with no issues. However, based on your reported error message, it's worth taking a moment to go to Window->Preferences->Code Composer Studio->Products to see if Energia is still installed.
  4. 2 points
    TI has listed a solution here: http://www.ti.com/tool/MSP-EXP430F5438 http://www.ti.com/tool/cc256xmspbtblesw The CC2650 seems to fit your requirements and you can get additional help on e2e if needed.
  5. 1 point
    estratos

    Serial1 on the MSP430FR2433

    For anyone interested, adding the following piece of code in pins_energia.h enables Serial1: static const uint8_t AUX_UARTRXD = 14; /* Receive Data (RXD) at P2.5 */ static const uint8_t AUX_UARTTXD = 15; /* Transmit Data (TXD) at P2.6 */ #define AUX_UARTRXD_SET_MODE (PORT_SELECTION0 | INPUT) #define AUX_UARTTXD_SET_MODE (PORT_SELECTION0 | OUTPUT) #define AUX_UART_MODULE_OFFSET 0x20 #define SERIAL1_AVAILABLE 1
  6. 1 point
    Markers

    MSP430G2553 Workshop

    Hi NurseBob. Thanks for your latest messages. The reference on low power design is great and will certainly help. You are correct in your assessment that l am "just getting into electronics" : I am 70 and a recently retired engineer and loving getting into hardware after decades of (self-taught) programming. Hence the sometimes naive questions! I have been using Dave Jones' blog which is very informative. Thanks again.
  7. 1 point
    Did you debounce the switch signal with some kind of circuit first? If not I believe you need add a debouncer, possibly in code. MAX6816 is an easy to use chip but adds parts and cost to the design, doing it by code only needs some programming effort to make it work.
  8. 1 point
    https://www.arrow.com/en/terms-and-conditions/free-raspberry-pi-3 Use code 50PI at checkout to receive this limited time offer. Promo code is valid for one (1) free Raspberry Pi 3 Model B+ or Raspberry Pi 3 Model B with all Arrow.com purchases of $50 or more after the discount has been applied (before taxes/fees). MyArrow customers are eligible for this promotion for purchases made on arrow.com only, so long as there are no specially priced items in their cart. Promo code cannot be combined with any other codes, but can be added onto any free shipping promotions automatically applied at checkout. Discount does not apply to purchases made on www.arrow.com/MyArrow and purchases made on components.arrow.com. Promo code may only be redeemed 3 times per customer per promotion period. Limit ten (10) Raspberry Pi 3 Model B or Raspberry Pi 3 Model B+ boards per order. Customers are responsible for any duties and taxes that may apply on international shipments. Arrow reserves the right to end this promotion at any time without notice. Offer valid for a limited time only and while supplies last.
  9. 1 point
    NurseBob

    SoftwareSerial Communication Issues

    Also, where is sendrequest() ever callled? Who's sending, who's responding? Unclear from your code snippet(s) if anyone is sending, if one is sending, etc. Are both running the same code?
  10. 1 point
    NurseBob

    SoftwareSerial Communication Issues

    > I hope the connection is all right. You might want to think about if you want TX->TX, or TX->RX?
  11. 1 point
    Have you tried the reset button after upload? Or disconnecting and reconnecting? If so, does the blink program begin on one of those events? Are you running identical code in both cases? Is the CCS version an import of the Energia project, or are you running the TI CCS blink code and something else in Energia? Post some code...
  12. 1 point
    NurseBob

    code stuck at the end of setup

    I'm not quie clear on your question, and at the risk that it's obvious... for(;;) = loop forever If your Engergia code has an empty loop(), and never does anything to generate a serial event, then it's going to be "stuck" in a loop that repeatedly checks for a serial event. So, what's in your loop() code? What do you expect to see?
  13. 1 point
    Concentrate on one problem at a time. Create a new project. Write a program that tests out only the serial port. Create another project that tests out only the LCD. Divide and conquer!!! Once you have those working then you can get back to that crazy math you are trying to do!
  14. 1 point
    Hi @Salibensuleiman Wow! That's a wall of text that is impossible to understand. Please use the code "<>" tags on your software. For example, here is your code #include <LCD_Launchpad.h> #include <driverlib.h> #include <SPI.h> #include <LiquidCrystal.h> #include <driverlib.h> // Required for the LCD //#include <LiquidCrystal_I2C.h> //LiquidCrystal lcd; void setup() { // put your setup code here, to run once: //analogFrequency(10000); Serial.begin(9600); SPI.begin(); } float y11 = 0.0; float y12 = 0.0; float y13 = 0.0; float y21 = 0.0; float y22 = 0.0; float y23 = 0.0; float y31 = 0.0; float y32 = 0.0; float y33 = 0.0; float Ub11, Ub12, Ub13, Ub21, Ub22, Ub23, Ub31, Ub32, Ub33; float IN11, IN12, IN13, IN21, IN22, IN23, IN31, IN32, IN33; float y11New, y12New, y13New, y21New, y22New, y23New, y31New, y32New, y33New; void loop() { // put your main code here, to run repeatedly: // //Diagonal input // float U11=1; float U12=-1; float U13=1; // float U21=-1; float U22=1; float U23=-1; // float U31=1; float U32=-1; float U33=1; //Cross input float U11 = -1.0; float U12 = 1.0; float U13 = -1.0; float U21 = 1.0; float U22 = 1.0; float U23 = 1.0; float U31 = -1.0; float U32 = 1.0; float U33 = -1.0; //Templates A and b //A: float A11 = 0.045404; float A12 = 0.046816; float A13 = 0.046482; float A21 = 0.046741; float A22 = 4.0472; float A23 = 0.046741; float A31 = 0.046482; float A32 = 0.046816; float A33 = 0.045404; //b float b11 = 0.063908; float b12 = -0.061448; float b13 = 0.079005; float b21 = -0.061448; float b22 = 0.052166; float b23 = -0.061448; float b31 = 0.079005; float b32 = -0.061448; float b33 = 0.063908; //I float I = 0.047155; // float y11 = analogRead(A0); // float y12 = analogRead(A1); // float y13 = analogRead(A2); // float y21 = analogRead(A3); // float y22 = analogRead(A0.7); // float y23 = analogRead(A5); // float y31 = analogRead(A6); // float y32 = analogRead(A7); // float y33 = analogRead(A8); int counter = 0; if (counter == 0) { y22New = y11 * A11 + y12 * A12 + y13 * A13 + y21 * A21 + y22 * A22 + y23 * A23 + y31 * A31 + y32 * A32 + y33 * A33; Ub22 = U11 * b11 + U12 * b12 + U13 * b13 + U21 * b21 + U22 * b22 + U23 * b23 + U31 * b31 + U32 * b32 + U33 * b33; y11New = y11 * A11 + y12 * A12 + y21 * A21 + y22 * A22; Ub11 = U11 * b11 + U12 * b12 + U21 * b21 + U22 * b22; y12New = y11 * A11 + y12 * A12 + y13 * A13 + y21 * A21 + y22 * A22 + y23 * A23; Ub12 = U11 * b11 + U12 * b12 + U13 * b13 + U21 * b21 + U22 * b22 + U23 * b23; y13New = y12 * A12 + y13 * A13 + y22 * A22 + y23 * A23; Ub13 = U12 * b12 + U13 * b13 + U22 * b22 + U23 * b23; y21New = y11 * A11 + y12 * A12 + y21 * A21 + y22 * A22; Ub21 = U11 * b11 + U12 * b12 + U21 * b21 + U22 * b22; y23New = y12 * A12 + y13 * A13 + y22 * A22 + y23 * A23 + y32 * A32 + y33 * A33; Ub23 = U12 * b12 + U13 * b13 + U22 * b22 + U23 * b23 + U32 * b32 + U33 * b33; y31New = y21 * A21 + y22 * A22 + y31 * A31 + y32 * A32; Ub31 = U21 * b21 + U22 * b22 + U31 * b31 + U32 * b32; y32New = y21 * A21 + y22 * A22 + y23 * A23 + y31 * A31 + y32 * A32 + y33 * A33; Ub32 = U21 * b21 + U22 * b22 + U23 * b23 + U31 * b31 + U32 * b32 + U33 * b33; y33New = y22 * A22 + y23 * A23 + y32 * A32 + y33 * A33; Ub33 = U22 * b22 + U23 * b23 + U32 * b32 + U33 * b33; IN11 = y11New + Ub11; IN12 = y12New + Ub12; IN13 = y13New + Ub13; IN21 = y21New + Ub21; IN22 = y22New + Ub22; analogWrite(35, IN22); //pin 2.2 IN23 = y23New + Ub23; IN31 = y31New + Ub31; IN32 = y32New + Ub32; IN33 = y33New + Ub33; y11 = 0.7 * tanh(2.0 * IN11); y12 = 0.7 * tanh(2.0 * IN12); y13 = 0.7 * tanh(2.0 * IN13); y21 = 0.7 * tanh(2.0 * IN21); y22 = analogRead(A8); //0.7*tanh(2*IN22)+I; pin 9.0 delay(500); y23 = 0.7 * tanh(2.0 * IN23); y31 = 0.7 * tanh(2.0 * IN31); y32 = 0.7 * tanh(2.0 * IN32); y33 = 0.7 * tanh(2.0 * IN33); counter = 1; } else { y22New = y11 * A11 + y12 * A12 + y13 * A13 + y21 * A21 + y22 * A22 + y23 * A23 + y31 * A31 + y32 * A32 + y33 * A33; Ub22 = U11 * b11 + U12 * b12 + U13 * b13 + U21 * b21 + U22 * b22 + U23 * b23 + U31 * b31 + U32 * b32 + U33 * b33; y11New = y11 * A11 + y12 * A12 + y21 * A21 + y22 * A22; Ub11 = U11 * b11 + U12 * b12 + U21 * b21 + U22 * b22; y12New = y11 * A11 + y12 * A12 + y13 * A13 + y21 * A21 + y22 * A22 + y23 * A23; Ub12 = U11 * b11 + U12 * b12 + U13 * b13 + U21 * b21 + U22 * b22 + U23 * b23; y13New = y12 * A12 + y13 * A13 + y22 * A22 + y23 * A23; Ub13 = U12 * b12 + U13 * b13 + U22 * b22 + U23 * b23; y21New = y11 * A11 + y12 * A12 + y21 * A21 + y22 * A22; Ub21 = U11 * b11 + U12 * b12 + U21 * b21 + U22 * b22; y23New = y12 * A12 + y13 * A13 + y22 * A22 + y23 * A23 + y32 * A32 + y33 * A33; Ub23 = U12 * b12 + U13 * b13 + U22 * b22 + U23 * b23 + U32 * b32 + U33 * b33; y31New = y21 * A21 + y22 * A22 + y31 * A31 + y32 * A32; Ub31 = U21 * b21 + U22 * b22 + U31 * b31 + U32 * b32; y32New = y21 * A21 + y22 * A22 + y23 * A23 + y31 * A31 + y32 * A32 + y33 * A33; Ub32 = U21 * b21 + U22 * b22 + U23 * b23 + U31 * b31 + U32 * b32 + U33 * b33; y33New = y22 * A22 + y23 * A23 + y32 * A32 + y33 * A33; Ub33 = U22 * b22 + U23 * b23 + U32 * b32 + U33 * b33; IN11 = y11New + Ub11; IN12 = y12New + Ub12; IN13 = y13New + Ub13; IN21 = y21New + Ub21; IN22 = y22New + Ub22; analogWrite(35, IN22); //p.n 2.2 IN23 = y23New + Ub23; IN31 = y31New + Ub31; IN32 = y32New + Ub32; IN33 = y33New + Ub33; y11 = 0.7 * tanh(2.0 * IN11); y12 = 0.7 * tanh(2.0 * IN12); y13 = 0.7 * tanh(2.0 * IN13); y21 = 0.7 * tanh(2.0 * IN21); y22 = analogRead(A8); //0.7*tanh(2*IN22)+I; pin9.0 float voltage = Serial.println(y22 * 3.0 / 1023.0); y23 = 0.7 * tanh(2.0 * IN23); y31 = 0.7 * tanh(2.0 * IN31); y32 = 0.7 * tanh(2.0 * IN32); y33 = 0.7 * tanh(2.0 * IN33); } }
  15. 1 point
    Sounds like time to read the manual. Look at the memory map of the device and I think you'll have some insights into why you're running into problems. This is not an area where I have any other useful experience. Of course, there's also e2e as a resource.
  16. 1 point
    energia

    MSP432 no COM Port number assigned

    As you noted, there is something going wrong with the port assignment in Windows. It could be that all comports somehow have been assigned already and Windows is not giving them up to other devices. What does the Driver tab say in the device manager? Mine looks like the following. Where did the driver you installed come from? Did you download it from energia.nu? Have you tried rebooting windows?
  17. 1 point
    Markers

    Energia.core

    Hi All, Many thanks for all your responses. NurseBob, you were right on the money: Energia was not installed. I re-installed it and everything is now working as it should. Many thanks! Mark
  18. 1 point
    When you post a question asking for help, please provide minimal information about your configuration, both hardware and software, including: model of LaunchPad used and revision number model of the MCU used model of BoosterPack used or model of the sensor or actuator or screen optionally, links to the sensor or actuator or screen data sheet name and version of the IDE used OS the IDE is running on whenever possible, minimal code to replicate the issue optionally, all kinds of measures that may be useful, like logic analyser trace, oscilloscope screen-shots, ... Example: LaunchPad MSP430G2 revision 1.5
  19. 1 point
    Rei Vilo

    Interfacing BMG250 with TM4C1294XL

    It looks like the I²C implementation requires a specific period between write and read.
  20. 1 point
    A simple well documented hardware uart "Hello World" example. Updated, thanks for member comments 3/13/13 Notes: This code is for launchpad rev 1.5 This is hardware UART, your launchpad jumpers must be set for hardware UART The TI TUSB3410 is a TERRIBLE usb-> UART chip and is very buggy on WIN7 64bit. If your still having issues, it could be a driver issue. Try on XP or use a different USB -> serial device. //Nate Zimmer UART example // Press button to print hello to terminal #include <msp430g2553.h> // System define for the micro that I am using #define RXD BIT1 //Check your launchpad rev to make sure this is the case. Set jumpers to hardware uart. #define TXD BIT2 // TXD with respect to what your sending to the computer. Sent data will appear on this line #define BUTTON BIT3 void UART_TX(char * tx_data); // Function Prototype for TX void main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop Watch dog timer BCSCTL1 = CALBC1_1MHZ; // Set DCO to 1 MHz DCOCTL = CALDCO_1MHZ; P1DIR &=~BUTTON; // Ensure button is input (sets a 0 in P1DIR register at location BIT3) P1OUT |= BUTTON; // Enables pullup resistor on button P1REN |= BUTTON; P1SEL = RXD + TXD ; // Select TX and RX functionality for P1.1 & P1.2 P1SEL2 = RXD + TXD ; // UCA0CTL1 |= UCSSEL_2; // Have USCI use System Master Clock: AKA core clk 1MHz UCA0BR0 = 104; // 1MHz 9600, see user manual UCA0BR1 = 0; // UCA0MCTL = UCBRS0; // Modulation UCBRSx = 1 UCA0CTL1 &= ~UCSWRST; // Start USCI state machine while(1) // While 1 is equal to 1 (forever) { if(!((P1IN & BUTTON)==BUTTON)) // Was button pressed? { UART_TX("Hello World! \r\n"); // If yes, Transmit message & drink beer __delay_cycles(100000); //Debounce button so signal is not sent multiple times } } } void UART_TX(char * tx_data) // Define a function which accepts a character pointer to an array { unsigned int i=0; while(tx_data[i]) // Increment through array, look for null pointer (0) at end of string { while ((UCA0STAT & UCBUSY)); // Wait if line TX/RX module is busy with data UCA0TXBUF = tx_data[i]; // Send out element i of tx_data array on UART bus i++; // Increment variable for array address } }
  21. 1 point
    #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(); // } // } //
×