Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Using Go!Socket pin as IO pin


  • Please log in to reply
3 replies to this topic

#1 Kristoffer

Kristoffer

    Advanced Member

  • Members
  • PipPipPip
  • 37 posts

Posted 11 May 2012 - 10:13 AM

Hi

Newbie alert!!!!

I've searched this forum and the Internet a lot (and I've probably read the answer, just didn't understand it)

I've worked with Netduino for a short time and driven stepper motors with the BigEasyDriver (BED), no problem. However I would like to use the Netduino Go for my project because of the modules.

But how do I connect my BED? Is it possible to connect it to one of the GO Sockets?

I know I can buy the ShieldBase and use it as a normal Netduino, but can I use GO Socket pin 3-9 as IO's, say, connect
GO Socket pin 3 to BED "dir",
GO Socket pin 4 to BED "step",
GO Socket pin 5 to BED "MS1"
and GO Socket pin 10 would go to BED "gnd"?

If possible, how would I reference the pins in C# code?

If it's unclear, I can provide a sketch of what I mean.

Am I way off?

Thanks
Kristoffer

#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 11 May 2012 - 02:22 PM

Hi Kristoffer,

You could technically do something like this, but the sockets are really meant more as expansion ports than as pins to use directly.

Regarding references to pins...if you take a look at the Netduino Go schematic, you can see which MCU pins go to which socket pins. PA0-PA15 can be referenced as (Cpu.Pin)0x00 through (Cpu.Pin)0x0F. PB0-PB15 can be referenced as (Cpu.Pin)0x10 through (Cpu.Pin)0x1F, and the pattern continues through the PC## pins, PD## pins, etc. (i.e. each port letter takes up 16 pin #s and they're all sequential).

We love hardware hacking...so you're welcome to go this path...but using the Shield Base is much more straightforward and much simpler. :)

Chris

#3 NXTwoThou

NXTwoThou

    Advanced Member

  • Members
  • PipPipPip
  • 68 posts
  • LocationTulsa, OK

Posted 11 May 2012 - 07:10 PM

Actually, that's pretty cool.

InputPort D0 = new InputPort((Cpu.Pin)0x20, true, Port.ResistorMode.Disabled);

Would be PC0 GPIO_SOCKET1 So if you connect pin 10(GND) to pin 3 on socket 1, you get a trigger. For someone that might just need a single input and has a free socket, that's quick and painless.


I thought I could do the same to PB11 /SPI_CS_SOCKET1(the only other pin that seems to be unique for that socket), but this doesn't seem to work the same for pin 6.

InputPort D1 = new InputPort((Cpu.Pin)0x1b, true, Port.ResistorMode.Disabled);


#4 Kristoffer

Kristoffer

    Advanced Member

  • Members
  • PipPipPip
  • 37 posts

Posted 11 May 2012 - 08:33 PM

Thanks a lot for your replies, I'll look into it. Kristoffer




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.