Jump to content
43oh

dchaplinsky

Members
  • Content Count

    13
  • Joined

  • Last visited

Reputation Activity

  1. Like
    dchaplinsky got a reaction from SeuPay in XIN/XOUT as digital outputs   
    Yes, I can confirm that patching energia_pins.h works. Thanks.
     
    Do someone needs a lib for controlling 7 seg indicator?
  2. Like
    dchaplinsky reacted to energia in XIN/XOUT as digital outputs   
    Table 21 and Table 22 in the 2553 datasheet show Pin Functions shows P2SEL as low for GPIO which is what you want.
     

    P2SEL &= ~(BIT6|BIT7);
    The above will put it those pins into XIN/XOUT mode which is not what you want.
    Looking at the code on http://pastebin.com/BGPC7iBk you call digitalWrite for pin 19 (P2.6). Unfortunately this pin is not in the pin map and thus it will not work.
     
    The fix:
    In the file hardware/msp430/variants/launchpad/pins_energia.h change digital_pin_to_port[] and digital_pin_to_bit_mask[] to look like below. I don't have a Launchpad handy right now so can't test it but am pretty sure that this change will do the trick.
     
    Will fix it and make sure that it will go into the next release.
     

    const uint8_t digital_pin_to_port[] = { NOT_A_PIN, /* dummy */ NOT_A_PIN, /* 1 */ P1, /* 2 */ P1, /* 3 */ P1, /* 4 */ P1, /* 5 */ P1, /* 6 */ P1, /* 7 */ P2, /* 8 */ P2, /* 9 */ P2, /* 10 */ P2, /* 11 */ P2, /* 12 */ P2, /* 13 */ P1, /* 14 */ P1, /* 15 */ NOT_A_PIN, /* 16 */ NOT_A_PIN, /* 17 */ P2, /* 18 */ P2, /* 19 */ NOT_A_PIN, /* 20 */ };

    const uint8_t digital_pin_to_bit_mask[] = { NOT_A_PIN, /* 0, pin count starts at 1 */ NOT_A_PIN, /* 1, VCC */ BV(0), /* 2, port P1.0 */ BV(1), /* 3, port P1.1 */ BV(2), /* 4, port P1.2 */ BV(3), /* 5, port P1.3*/ BV(4), /* 6, port P1.4 */ BV(5), /* 7, port P1.5 */ BV(0), /* 8, port P2.0 */ BV(1), /* 9, port P2.1 */ BV(2), /* 10, port P2.2 */ BV(3), /* 11, port P2.3 */ BV(4), /* 12, port P2.4 */ BV(5), /* 13, port P2.5 */ BV(6), /* 14, port P1.6 */ BV(7), /* 15, port P1.7 */ NOT_A_PIN, /* 16, RST */ NOT_A_PIN, /* 17, TEST */ BV(7), /* 18, XOUT */ BV(6), /* 19, XIN */ NOT_A_PIN, /* 20, GND */ };
  3. Like
    dchaplinsky reacted to Rickta59 in XIN/XOUT as digital outputs   
    Maybe you could pastebin post all the code and describe/schematic of what you are doing with the hardware.
  4. Like
    dchaplinsky reacted to Rickta59 in SoftwareSerial port for Energia?   
    You could the launchpad with mspdebug and msp430-gdb for true hardware debugging. However, that isn't supported directly from the Energia environment. You would have to use the command line tools to get at that capability. Unfortunately it doesn't solve your other requirement of using two ports in the future.
     
    What you want to do is possible. However, it would be best accomplished using native code to program the peripherals using a lower level access than the Energia API provides. You can look in the projects section of this forum for serial code that uses cycle counting and bit banging to implement alternate serial port capability.
×
×
  • Create New...