Jump to content

Search the Community

Showing results for tags 'PinMode'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News
    • Announcements
    • Suggestions
    • New users say Hi!
  • Spotlight!
    • Sponsor Spotlight
    • Sponsor Giveaways
  • Energia
    • Energia - MSP
    • Energia - TivaC/CC3XXX
    • Energia - C2000
    • Energia Libraries
  • MSP Technical Forums
    • General
    • Compilers and IDEs
    • Development Kits
    • Programmers and Debuggers
    • Code vault
    • Projects
    • Booster Packs
    • Energia
  • Tiva-C, Hercules, CCXXXX ARM Technical Forums
    • General
    • SensorTag
    • Tiva-C, Hercules, CC3XXX Launchpad Booster Packs
    • Code Vault
    • Projects
    • Compilers and IDEs
    • Development Kits and Custom Boards
  • Beagle ARM Cortex A8 Technical Forums
    • General
    • Code Snippets and Scripts
    • Cases, Capes and Plugin Boards
    • Projects
  • General Electronics Forum
    • General Electronics
    • Other Microcontrollers
  • Connect
    • Embedded Systems/Test Equipment Deals
    • Buy, Trade and Sell
    • The 43oh Store
    • Community Projects
    • Fireside Chat
  • C2000 Technical Forums
    • General
    • Development Kits
    • Code Vault
    • Projects
    • BoosterPacks

Calendars

There are no results to display.


Found 3 results

  1. I'm writing my own i2c library and need to be able to simultaneously change PinMode on 2 pins. One for SCL and one for SDA. Is there a way to change PinMode on 2 pins simultaneously? I want the behavior of the follwing: PinMode(14,OUTPUT); PinMode(15,INPUT); without the 2.5microsecond delay between the 2 calls above.
  2. So, I'm using Energia and getting frustrated with Wire.h. I need to do some i2c communications and figured it would be fairly easy to write my own Bit-Bang implementation of i2c. I got started and things seem to be working pretty well. However, I discovered the concept of OpenCollector. It seems that OpenCollector means that the pin is set to High by default with a Pullup Resister and you just set it to LOW and then it goes back to high when you're not setting it to LOW. It also goes to low when a slave i2c device sets it to LOW. Question is how the heck do we do this with Energia?? Does pinMode(INPUT) set a pin to OpenCollector mode? Does pinMode(INPUT_PULLUP) set a pin to OpenCollector mode? If either of these do, what does digitalWrite(LOW) do on that pin? It sets it to LOW, but for how long? Do you have to set it back to HIGH, or does it get pulled back up to HIGH, or does setting it to HIGH, just release the LOW pull-down? This behavior doesn't seem to be documented anywhere that is easy to find. Perhaps it's not intended to be used that way, but I don't know how a person would implement i2c correctly without being able to set the SCL and the SDA to OpenCollector mode and to be able to pulse the clock. Speaking of pulsing the clock, how is that to be accomplished? Seems like you should be able to pull it LOW and then let it go, but I'm not sure how to 'let it go' back to its HIGH state without just calling digitalWrite(HIGH) on that pin.. But then aren't I holding it high? Anyway, if somebody has a good explanation around this, I would LOVE to hear it. I found some hints about it at the following location http://energia.nu/Constants.html But it didn't use the term OpenCollector anywhere...
  3. pinMode(n, INPUT_PULLDOWN) does not work on MSP432. The pins seem to function as input and the pull-up is always enabled in any input mode.
×