So I purchased a LED7R from GHI to try with my NetDuino Go, and I have had some success, but some issues.
I found this other post on the forums for using Netduino Go socket pins for IO pins, which is what I think I need to do. But I don't understand the answer given.
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).
If I read this correctly, I should be able to access all pins on the sockets. But I can't figure out the pin numbers, using the hex values doesn't compute to what I see working below.
I am using my LED7R on Netduino Go Socket 4.
I am able to turn on and off a couple of the LEDs, but I cannot figure out the other pins for the socket.
Based on the code in GoHub.cs method GetSocketPhysicalResources
case 4: // socket 4
gpio = (Cpu.Pin)0x23; //Pins.GPIO_PIN_C_3;
spi_mod = SPI.SPI_module.SPI1;
spi_cs = (Cpu.Pin)0x08; //Pins.GPIO_PIN_A_8;
led = (Cpu.Pin)0x19; //Pins.GPIO_PIN_B_9;
gpio (Cpu.Pin)0x23 maps to pin 3 so I am able to turn on D1 on the LED7R
spi_cs (Cpu.Pin)0x08 maps to pin 6 so I am able to turn on D4 on the LED7R
My first question, is that I can't understand the NetDuino Go Schematic pins. If I look at the schematic, I see that socket 4, pin 3, is GPIO_SOCKET4. Looking at the chip in the middle, GPI_SOCKET4 goes to PC3 pin 11. Well that is obviously not correct, as I am able to use (Cpu.Pin) 0x23 for GPIO on socket 4, and 0x23 is not 11. Can someone help me to understand how to read the pins from the schematic?
My question is, how do I directly address the other pins on socket 4?
Pin 3 GPIO_SOCKET4 which is (Cpu.Pin) 0x23
Pin 4 USART2_TX which is ???
Pin 5 USART2_RX which is ???
Pin 6 SPI_CS_SOCKET4 which is (Cpu.Pin) 0x08
Pin 7 SPI1_MOSI which is ???
Pin 8 SPI1_MISO which is ???
Pin 9 SPI1_SCK which is ???