Understanding Pi to GrovePi+ pins[SOLVED]

I’ve been looking at your pin diagram for the GrovePi+ and trying to relate it to my Pi Model B (Both are linked here.)

There are a couple of things I don’t understand.

  1. Let’s take port D7 and D8 on the GrovePi+. There are pins on the diagram labelled “7” and “8” on D7 and “8” and “9” on D8. Are those two “8” pins the same pins? Why are there two pins for a digital port?

  2. Which pins from the GPIO are connected to the Ports? Is there any way for me to tell?

My ultimate goal here is to know which pins I can use from the GPIO off the top of the GrovePi without interfering with it. I need 5 pins for a control of some ICs in addition to some support from the GrovePi (for the LCD display and making it easier to run some switches).

Edit 1: I did find this older link but there are three issues: I’m not sure if it’s exhaustive; I don’t know if it’s using GPIO pin numbers or physical ordering; and irrespective of #2:

  • If it’s using GPIO, then it doesn’t make sense as the Raspberry pi has no GPIO 0 and 1
  • If it’s using physical numbering, then there is still no pin 0, and pin 9 is ground.

Edit 2: It might be that you guys are using a naming that I haven’t found in use for the board. Basically, it looks like if I consult this schematic I just have to avoid physical pins 3, 5, 8, 10, 19, 21, 23, and 24. Is that correct?

Hi @el-tea,

D7 and D8 are termed as Ports or Sockets while the pins on the diagram labelled “7” and “8” on D7, refer to the Digital Pin number to which they are connected on the ATMEGA328.
Digital Pin “8” is the same pin that is connected to Port D7 and D8, the reason being is that, some sensors might need two pins for their working, more details about the Pin overlap can be found in this discussion.

Only the Serial and I2C pins from the GPIO are connected to the Ports and you can use all the Pins on GPIO header of GrovePi except the Pin 24- (Broadcom 8 Pin). You can refer to this post for further details.

It also looks like the schematic you are referring to in your Post is of GrovePi0.Can you please clarify if you are using GrovePi0 or GrovePi+. If you are using GrovePi+ then you should follow [this schematic] (https://github.com/DexterInd/GrovePi/blob/master/Hardware/GrovePi%2B%20v3.0.pdf).

Please us know if this helps
-Shoban

Thanks very much. I am indeed using GrovePi+. Looking at the schematic, it seems the interface to the Raspberry Pi uses the same pins irrespective of GrovePi0 or GrovePi+.

So if I understand it correctly, since only GPIO0/GPIO1 (physical 3/5) and GPIO8 (physical 24, for reset) are used when the GrovePi+ is in operation. The others (GPIO14/GPIO15/GPIO10/GPIO9/GPIO11, physical pins 8/10/1921/23) are all available for use.

Thank you for the help.

Mike

Hi @el-tea,

Its good to know that the information helped you. GPIO0/GPIO1 (physical 3/5) can also be used, provided they are used for I2C communications. So the only Pin that cannot be used on the 26 Pin header of GrovePi+, is the physical Pin 24( Broadcom Pin 8).

Do let us know if this helps,
-Shoban

Hi, @Shoban

I still don’t understand the meaning of the label.
It seems that label 7/8 is in accord with GPIO 7/8. Like the GPIO(R3 modeB) photo here

But how about label 1/0 in the SERIAL? I can’t find the GPIO 1/0 there.

By the way, I’m using JAVA to develop some programs on GrovePi with Pi4J. I’m trying to understand the code in GPIO mapping with responding to the Port(A0, A1…, D2, D3, …).

Hi @agau9527,

The ports on the GrovePi(A0,A1,D2…) aren’t connected to Raspberry Pi pins directly, they are connected to the ATMEGA 328 chip on the GrovePi. The only ports that are directly connected to the Pi Pins are RPISERIAL, SERIAL and I2C ports. The post above was regarding the 26 pin Pi header that you see on the GrovePi and not the GrovePi ports. You can refer to this page for detailed explanation on GrovePi port description.

Please let us know if this helps,
-Shoban

Hi, @Shoban
According to this state:

Thanks for your responses. I have 2 questions in addition.

Q1.
Does that mean the label 7(or 8) is connected to the physical pin no.7(or 8) on the GrovePi? here

Or it has nothing to do with the physical pin on GrovePi?

Q2.
According to the website, I now understand that the serial and I2C pins on the Raspberry Pi are directly linked to the GrovePi. And there are also 26 physical pins on the GrovePi, does that means the 26 pins on the GrovePi have the same functions as the RaspberryPi?

For example, I have a led and I want to connect it to the RaspberryPi like the picture in Pi4J tutorial here.

Does it work if I connect the led to the same pins(pin no.6 and no.12) on GrovePi?

Because I have bought some gadgets of RaspberryPi before and I want to use them with my new bought GrovePi sensors.

Thanks for your help!

Hi @agau9527,

Ans1: By Pin numbers 7 and 8 inside Port D7, we mean to tell the pins inside the Port D7 are connected to the Digital Pins 7 and 8 of the ATMEGA 328 chip on GrovePi as shown in the image below.

The 7 and 8 labels on D7 do not refer to the Raspberry Pi GPIO pins.

Ans 2: Yes the 26 Pi header pins on GrovePi have the same functionality as Raspberry Pi’s 26 GPIO pins. However one should not use the pin 24 of the GrovePi header as it resets the GrovePi. Hence you can use the LED with the GrovePi’s header pins 6 and 12.

Please let us know if this helps,
-Shoban

Hi @Shoban ,

Thanks to you very much!
These posts and discussions really help me a lot!

Hi @agau9527,

Glad we were able to help you. Thanks for the feedback.

-Shoban