07-30-2017, 10:29 AM
(This post was last modified: 07-30-2017, 10:40 AM by MarkHaysHarris777.)
There are no holes in the Pine64 board that match the stand-offs that would descend from the Pi Hat. Putting down insulating stand-offs can also be problematic, since two of the four holes in the standard-shape Hat end up above other components on the board: The hole near pins 1 and 2 of the PI-2 connector ends up partially above the CSI connector, and the hole in the adjacent outside corner is above some surface-mounted components. The other two holes are also above areas of the board with exposed conductive elements, but these are a track and a test-point that don't protrude up from the board. Isolating standoffs would be ok here.
So some kind of mechanical adaptation will be necessary here.
However, even though the 40 pins of the GPIO connector are largely similar to what a Hat would expect, a few difference are there, which can possibly get in the way, depending on the Hat design:
1. Pin P7, PL10/GPIO 362, uses 1.8V logic so a logic High here might be marginal to drive higher-voltage logic.
2. Pins P3 and P5, which are the SDA and SCL for the main i2c buss, does not have pull-up resistors included, so these may have to be added. Apart from this, the i2c buss here works just about identical to the one on the Raspberry Pi, even the device-file is /dev/i2c-1 on both.
3. The SPI bus only supplies one Chip Select, CS0 on pin P24. There is no CS1 on pin P26; this is a regular GPIO. Thus there is only the /dev/spidev0.0 present in the operating system, when this is enabled.
4. Many of the GPIOs do not support interrupts. All of them do on the Raspberry Pi, but on the Pine, only the PB, PH, PL (and PG) series of GPIOs support interrupts. Notably the various PC ones that appear on this connector do not. If the ability to detect changes on GPIO lines is not used, then this is not going to be any big issue.
5. The serial port on pins P8 and P10 is the UART2, so its device-file is /dev/ttyS2, but otherwise this works the same as the full-featured /dev/ttyAMA0 on a Raspberry (it does not have the limitations that the /dev/ttyS0 serial port has on the Raspberry Pi 3)