Jump to content
43oh

mediguejc

Members
  • Content Count

    1
  • Joined

  • Last visited

Posts posted by mediguejc

  1. Hello for information.

    I work in this moment for data logger. I need 2 SPI port (LCD and SD) and 1 I2C port (sensors). I Use TI MSP430FR5994 Launchpad.

    With Energia E18, impossible to use SCL (2), SDA (2), pin 9 and 10. (I need Pin 14,15 for I2C/SPI LCD, and I need Pin 48, 50 already connected on SD connector in launchpad), 

     

    1) don't forget to setup I2C module number:       Wire.setModule(2);          

     

    2) modify Pins_Energia.h as describe bellow   in  \Local\Energia15\packages\energia\hardware\msp430\1.0.3\variants\MSP-EXP430FR5994LP

     (see link in Energia Preference menu).    Select ' PORT_SELECTION0'

    ________________________________________________________________________________________________________________________________

    #ifndef Pins_Energia_h
    #define Pins_Energia_h
    #ifndef BV
    #define BV(x) (1 << (x))
    #endif

    // Attribute for placing R/W variables in FRAM
    // Example
    //      uint8_t DisplayBuffer[LCD_MAXIMUM_Y][LCD_MAXIMUM_X] PLACE_IN_FRAM;
    #define PLACE_IN_FRAM __attribute__((section(".text")))

    #if defined(__MSP430_HAS_EUSCI_B0__)
    static const uint8_t SS0     = 47;  /* P4.0 */
    static const uint8_t SCK0    = 49;  /* P2.2 */
    static const uint8_t MOSI0   = 48;  /* P1.6 aka SIMO */
    static const uint8_t MISO0   = 50;  /* P1.7 aka SOMI */
    static const uint8_t SS1     = 8;   /* P6.3 */
    static const uint8_t SCK1    = 7;   /* P5.2 */
    static const uint8_t MOSI1   = 15;  /* P5.0 aka SIMO */
    static const uint8_t MISO1   = 14;  /* P5.1 aka SOMI */
    static const uint8_t TWISDA0 = 48;  /* P1.6 UCB0 */
    static const uint8_t TWISCL0 = 50;  /* P1.7 UCB0 */
    static const uint8_t TWISDA1 = 15;  /* P5.0 UCB1 */
    static const uint8_t TWISCL1 = 14;  /* P5.1 UCB1 */
    static const uint8_t TWISDA2 = 10;  /* P7.0 UCB2 */
    static const uint8_t TWISCL2 = 9;   /* P7.1 UCB2 */
    #define TWISDA0_SET_MODE (PORT_SELECTION1 | INPUT_PULLUP)
    #define TWISCL0_SET_MODE (PORT_SELECTION1 | INPUT_PULLUP)
    #define TWISDA1_SET_MODE (PORT_SELECTION0 | INPUT_PULLUP)
    #define TWISCL1_SET_MODE (PORT_SELECTION0 | INPUT_PULLUP)
    #define TWISDA2_SET_MODE (PORT_SELECTION1 | INPUT_PULLUP)       #define TWISDA2_SET_MODE (PORT_SELECTION0 | INPUT_PULLUP)
    #define TWISCL2_SET_MODE (PORT_SELECTION1 | INPUT_PULLUP)        #define TWISCL2_SET_MODE (PORT_SELECTION0 | INPUT_PULLUP)
    #define SPISCK0_SET_MODE  (PORT_SELECTION1)
    #define SPIMOSI0_SET_MODE (PORT_SELECTION1)
    #define SPIMISO0_SET_MODE (PORT_SELECTION1)
    #define SPISCK1_SET_MODE  (PORT_SELECTION0)
    #define SPIMOSI1_SET_MODE (PORT_SELECTION0)
    #define SPIMISO1_SET_MODE (PORT_SELECTION0)

    .............................................................................................................

    __________________________________________________________________________________________________________________________________________________

     

    Best regards.  MJC.

     

     

×
×
  • Create New...