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

Mini Pin Enumeration?


Best Answer NooM, 19 May 2013 - 10:03 AM

cpu.pins. is only the hardware pin enumeration. means: pin 1 there is pin1 on the _uC_

you need to use Pins.yourpin (without cpu)

Go to the full post


  • Please log in to reply
3 replies to this topic

#1 baxter

baxter

    Advanced Member

  • Members
  • PipPipPip
  • 415 posts

Posted 19 May 2013 - 09:53 AM

The following post #6 lists the enum for Mini pins as 5 through 20.

 

http://forums.netdui...-pin-functions/

 

In Object Browser, SecretLabs.NETMF.Hardware.NetduinoMini.Pins gives
the same enumeration. On the other hand, Microsoft.SPOT.Hardware.CPU.Pin
gives GPIO_Pin0 through GPIO_Pin15, as does IntelliSense. If I want to declare
pin/leg 20 as a chip select pin for SPI, how do I declare it?  This does not work for pin 20,

 

Dim ChipSelect As Cpu.Pin = Cpu.Pin.GPIO_Pin20 <-- ERROR

nor does this,

Dim ChipSelect1 As SecretLabs.NETMF.Hardware.NetduinoMini.Pins = Cpu.Pin.GPIO_PIN_20

The latter gives the error: GPIO_PIN_20 is not a member of Microsoft.SPOT.Hardware.CPU.Pin

 

I am using firmare v4.2.0.1. Also, what is GPIO_Pin0? I was using GPIO_PIN8 under the

assumption that it referred to physical leg 8, but I get no signal on Saleae Logic.

 

 

 

 

 

 

 

 

 

 

 

 

 

 



#2 NooM

NooM

    Advanced Member

  • Members
  • PipPipPip
  • 490 posts
  • LocationAustria

Posted 19 May 2013 - 10:03 AM   Best Answer

cpu.pins. is only the hardware pin enumeration. means: pin 1 there is pin1 on the _uC_

you need to use Pins.yourpin (without cpu)



#3 baxter

baxter

    Advanced Member

  • Members
  • PipPipPip
  • 415 posts

Posted 19 May 2013 - 07:57 PM

Thanks NooM,

Works now,

Dim ChipSelect As Cpu.Pin = Pins.GPIO_PIN_8

 

Attached Files



#4 NooM

NooM

    Advanced Member

  • Members
  • PipPipPip
  • 490 posts
  • LocationAustria

Posted 19 May 2013 - 07:59 PM

great :D






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.