BTW. I will send the P2D2 off tomorrow either way. I have the Mate pcb with HyperRAM + ESP32 + RTC and also the DEV board to finish off in the meantime.
Sounds good, and will allow BOM confirmation
Did you manage to import my design fork of P2D2Pi, to see the connector mapping ?
The pin-matchups I finally settled on & routed, are for Pi UART i2c, and SPI0, and allows SPI1 support on lower P2 connector. (Upper connector has those pins on FLASH & BOOT) These also allow full P2io connection.
(P2D2Pi map below, & with a random web Pi example as confirmation)
These involve just a fairly simple rippled-pin swap (see image below), and the wide appeal here, is it allows the 40 pin headers on P2D2Pi to connect to the sea of Pi peripherals.
This makes both 40 pin headers (CN1 and CN3) 'Pi compatible'.
Why mangle a perfectly good and sensible pinout for a Pi'ttance? The P2D2 is much smaller than the Pi so why not have a Pi compatible motherboard that the P2D2 plugs into or even as an SMD module (minus the pin headers)? That way you can have the Magjack and USB connectors etc.
Why mangle a perfectly good and sensible pinout for a Pi'ttance?
Is that a serious question ?
A: Because the Pi is a hugely successful, established and standard pinout, with a ship load of commercial items like LCD displays, in stock, right now.
The simple step of a few pins swapped, means P2 users can replace Pi's, or connect to Pi's, easily and at will. They can even bridge 2 Pi's if they want to.
It is in everyone's interest to have P2 ramp as quickly as possible, to as many users as possible.
It means classes can have a collection of Pi Hats/Bonnets, and any mix of Pi's and P2D2Pi's to teach with.
The P2D2 is much smaller than the Pi so why not have a Pi compatible motherboard that the P2D2 plugs into or even as an SMD module (minus the pin headers)? That way you can have the Magjack and USB connectors etc.
I'm not really following. Pi has many models, and Pi Zero is smaller than P2D2.
The pin headers, which are what matters here, are exactly the same product and size. both are 40 pins, 0.1".
Why add a mother board, to connect to a LCD etc, when someone will look at it and go "but this is just swapping a few pins, 40 pin to 40 pin, why do I need this ?"
To save your time, I've even provided an already routed example, showing how it can be done
@jmg - I think you have missed the whole point of the P2D2 from the beginning. It is meant to be both a reference design at a time when there was not even any schematics, and also as a stand-alone or plug-in module for P2 projects and evaluation. A P2Pi would be just one of those projects but I have some serious stuff I will be using P2 for and Pi compatibility does not even come into that.
P2D2 as it is, is perfect. Trying to make P2 compatible to a Pi or Arduino is where it becomes mangled and less than perfect although maybe perfect for someone's project.
Now if you were to do a P2Pi then you could build it, test it, and write code for it and post all that really useful done-it-myself info.
@jmg, given the P2D2 is already smaller than a HAT, it should be simple enough later on for someone to make up an extended width version that remaps pins at the edge to suit Pi and has connectors/holes for both formats, perhaps allowing cutoff of the Pi end if you don't need it. Not everyone is going to need Pi compatibility in the modular form, and the regular pin layout P2D2 uses can be helpful for wide buses such as parallel LCDs. I know because I have both these connector types on my own board also routed between them and an LCD. The Pi IO routing I did was more painful, though I kept Pi GPIO numbers matching P2 pin numbers for ease of coding. I guess a spaghetti GPIO mapping would be easier to route but more troublesome during the software design stage.
P2D2 as it is, is perfect. Trying to make P2 compatible to a Pi or Arduino is where it becomes mangled and less than perfect although maybe perfect for someone's project.
I'm not following how some pin swaps, with the same-pins available, that greatly expands the usefulness of a product, can be called "mangled and less than perfect".
Indeed the "greatly expands the usefulness of a product' rather proves the exact opposite.
It is only a simply pin-swap, with an example provided....
@jmg - you shouldn't doubt that what I am doing and saying is serious because the proof of the pudding is there in an actual real-life P2D2 design.
Now tell me how is that this pin swap mangle to suit the Pi works better and is more flexible for P2 designs of all sorts? We are promoting the P2 by providing a platform for utilizing the unique features of the P2.
But I have said this so many many times before to you, if you want it that way, then build it that way, and share your work just as I share mine.
.. it should be simple enough later on for someone to make up an extended width version that remaps pins at the edge to suit Pi and has connectors/holes for both formats, perhaps allowing cutoff of the Pi end if you don't need it...
Yes, I did one trial variant that was like that, but once done, it seemed silly to have 2 x 40 pin headers, almost the same, wastes board space, and adds the risk of which do users plug into ?
One of P2D2's appeal, is the very compact size.
Not everyone is going to need Pi compatibility in the modular form, and the regular pin layout P2D2 uses can be helpful for wide buses such as parallel LCDs....
Valid point, but if you look at the example images, the castellation connectors are still very much pin-linear, so I do not imagine any issues routing a P2D2Pi to parallel LCDs.
The Pi IO routing I did was more painful, though I kept Pi GPIO numbers matching P2 pin numbers for ease of coding. I guess a spaghetti GPIO mapping would be easier to route but more troublesome during the software design stage.
The Pi connector is already rather scrambled in order, and most IO is done via i2c/SPI/UARTs, there is very little wide-parallel code out there.
With modules claiming 128MHz SPI, there seems little need for parallel bashing. I'm fine with the subset of HW i2c/SPI/UART, as that's where the activity is (see above examples).
Even the i2s bonnet can drop onto P2D2Pi header.
Thus I finally chose to focus on Peripheral mapping, and keep all P2 pins linear on castellation (for the reason you mentioned), and given P2 pins are all fully-soft, that's really no big issue.
The lowest level software code is clearly going to be quite different anyway, as a P2 UART ASM is very different from Pi Hardware registers.
Higher level code should be highly portable between P1 and P2.
Now tell me how is that this pin swap mangle to suit the Pi works better and is more flexible for P2 designs of all sorts?
We are promoting the P2 by providing a platform for utilizing the unique features of the P2.
I thought I had just done that ?
It `works better and is more flexible for P2 designs of all sorts' because it allows instant & simple tap-into a vast resource of existing boards.
There are two connectors on P2D2Pi so one can connect to any Pi-Hat/Bonnet you choose, with the other free to do other tasks...
It also means P2 will be adopted more quickly into classes.
I'm not sure why you call it a pin swap mangle ? - pcb pins do not really care what order they are in, (as long as they are routed) and it maps to an established industry standard.
History is full of standard but strange-order-if-you-look-close physical mappings.
Yes, the Pi pinout is not what would have been my personal first choice, but that standard is already now set, and is widely followed.
@jmg - There will always be contention when there is a difference of opinion or direction just as when two logic outputs tied together want to go in opposite directions. Simply solution is not to tie them together since they are separate signals.
A P2D2Pi with the Pi pinout can be manufactured easily, just finish and send the files off to a pcb house, order the parts, and build it. We await your foray from theory and suggestion into practice and example.
Is it PCB sending today Peter? When you do, better tell Roger, he's been waiting oh so patiently.
I sent my dual compact VGA pcb off this morning. I'm hoping it will work with P2D2 too, but not 100% sure because the 2nd screen will be on P22~P26, and I'm not 100% sure whether it has to align with groups of 8 or not.
@jmg, I think a nice product for someone to make would be something starting out like a P2D2 but completely within a RaspPi form factor, assuming HDMI works out okay. You could add i2c, microSD/flash, i2s audio DAC, and serial IO (via micro USB power port), W5500 type Ethernet and/or WiFi, plus a USB HUB IC with a P2 host USB all hanging off the port B, leaving port A free to route over as the Pi header. Should just about be enough pins for doing this. It would make a more Pi compatible system for attaching HATs etc. Ideally some type of external RAM (HyperRAM or perhaps QSPI if pins are limited) could be fitted too. This is different to the P2D2 module application however.
I'm sure someone will eventually make something like this too.
@jmg, I think a nice product for someone to make would be something starting out like a P2D2 but completely within a RaspPi form factor, assuming HDMI works out okay. You could add i2c, microSD/flash, i2s audio DAC, and serial IO (via micro USB power port), W5500 type Ethernet and/or WiFi, plus a USB HUB IC with a P2 host USB all hanging off the port B, leaving port A free to route over as the Pi header. Should just about be enough pins for doing this. It would make a more Pi compatible system for attaching HATs etc. Ideally some type of external RAM (HyperRAM or perhaps QSPI if pins are limited) could be fitted too. This is different to the P2D2 module application however.
I'm sure someone will eventually make something like this too.
Yes, when I dropped the P2D2 onto the Pi I was thinking that this might be a possibility. So I dropped the SMD version onto the Pi and it fits nicely:
Very nice. Only downside I see is that we need to fix the clock at 250/270MHz or so for HDMI to work, but other than that if the peripherals can fit it could be another handy P2 toy to experiment with. Particularly if it becomes self hosted with Python, Taqoz etc.
Here's a P2 in Pi form factor pin allocation possibility to see what fits...
P62-P63 UART via micro USB or Wifi (2 pins)
P58-P61 MicroSD + Flash (4)
P56-P57 L+R analog Audio (2)
P48-P55 HDMI (+ VGA /component/composite option via FFC headers?) (8)
P43-P47 SPI Ethernet + Int. pin (5)
P40-P42 HyperRAM control (3)
P32-P39 HyperRAM data (8)
P28-P31 USB host + hub control (4 pins)
P2-P27 GPIO for RasPi header, same GPIO pin numbering as P2 port A bits for convenient mapping (26)
P0-1 I2C for RasPi HAT I2C channel (ID_SCL/ID_SDA) & on board RTC (2)
Pete if its not too much trouble can I get you to measure the size of the castallated pads, because I'm going to mate with these, and want to use the same size pad on the mating board. Best I can tell with the ruler and magnifier they're about 50 x 40 mil. Am i close?
@jmg, I think a nice product for someone to make would be something starting out like a P2D2 but completely within a RaspPi form factor, assuming HDMI works out okay. You could add i2c, microSD/flash, i2s audio DAC, and serial IO (via micro USB power port), W5500 type Ethernet and/or WiFi, plus a USB HUB IC with a P2 host USB all hanging off the port B, leaving port A free to route over as the Pi header. Should just about be enough pins for doing this. It would make a more Pi compatible system for attaching HATs etc. Ideally some type of external RAM (HyperRAM or perhaps QSPI if pins are limited) could be fitted too. This is different to the P2D2 module application however.
I'm sure someone will eventually make something like this too.
They might, but there you are trying to clone a Pi more exactly, whilst my focus is less about Pi itself, and more about easy access to the Pi resource pool that includes HAT and Bonnet, some Iisted above.
Many of those are PiZero sized, or smaller (ie already smaller than P2D2)
An appeal of P2D2(Pi) is it is only a large as it needs to be, and I like the KISS aspect of easy, direct HAT compatibility.
The more I look, the more HATs and Bonnets I find, covering a whole range of uses.
Out of a couple of dozen application areas, so far only one would not usefully plug straight into a P2D2Pi.
That's exactly the sort of batting average I was hoping for, in taking the trouble to explore a P2D2Pi layout
That would be compelling in any classroom situation, and general development bench.
I agree with you jmg that the Pi header is excellent for being able to use existing products. Just no need for the P2D2 itself to have this right now. I'm thinking that something like Peter has pictured above with my pin mapping would probably suit education very well. Someone needs to make this...maybe Parallax ?
Pete if its not too much trouble can I get you to measure the size of the castallated pads, because I'm going to mate with these, and want to use the same size pad on the mating board. Best I can tell with the ruler and magnifier they're about 50 x 40 mil. Am i close?
What size is the castellation hole, 0.7mm?
Spot on at 50x40 and the hole is just shy of 0.7mm at 25mil. Are you able to import the PCAD version into Diptrace? I will update the pcad version shortly.
I agree with you jmg that the Pi header is excellent for being able to use existing products. Just no need for the P2D2 itself to have this right now. I'm thinking that something like Peter has pictured above with my pin mapping would probably suit education very well. Someone needs to make this...maybe Parallax ?
Maybe they will. It might depend on how well the HDMI and new die finally play out.
Given such a board comes up short on MHz, RAM, and USB and Ethernet speeds, they may decide that rather than clone a Pi, they should instead complement it, and do a `P2 as a HAT`.
That logically means ... a compact P2 board, with a Pi compatible pinout
I see that JLCPCB now offer 24-hr quick turn on 1 or 2 layer pcbs at no extra charge! You know what, I might even get these boards back this week!
I moved the USB connector a little closer to the edge and it's only the cables that don't fit many devices that might not push in fully but most of the cables do. The PropPlug style connector was moved closer to the edge that was also shaved back and solder mask and silk screen covers the USB flange part. Otherwise, getting ready to press the send and order button.
That Schottky(?) diode footprint you recently put in Peter seems to be from the 5V rail and not 3.6V, (for back powering to VIN), is this right? Shouldn't it have been from 3.6V? Is this an error, I'm confused.
Yeah I see it in the schematic but on the last board picture it looks like it goes to 5V in the bottom right of the picture. Is the silkscreen covering something I'm not seeing?
Yeah I see it in the schematic but on the last board picture it looks like it goes to 5V in the bottom right of the picture. Is the silkscreen covering something I'm not seeing?
Hmmm, you're right, and you shouldn't be because the update pcb from schematic should be assigning the VIO net and highlighting a design rule violation. However I think what is happening is that the "assign net to connected copper" was then overriding that. What a gotcha.
Comments
Sounds good, and will allow BOM confirmation
Did you manage to import my design fork of P2D2Pi, to see the connector mapping ?
The pin-matchups I finally settled on & routed, are for Pi UART i2c, and SPI0, and allows SPI1 support on lower P2 connector. (Upper connector has those pins on FLASH & BOOT) These also allow full P2io connection.
(P2D2Pi map below, & with a random web Pi example as confirmation)
These involve just a fairly simple rippled-pin swap (see image below), and the wide appeal here, is it allows the 40 pin headers on P2D2Pi to connect to the sea of Pi peripherals.
This makes both 40 pin headers (CN1 and CN3) 'Pi compatible'.
Is that a serious question ?
A: Because the Pi is a hugely successful, established and standard pinout, with a ship load of commercial items like LCD displays, in stock, right now.
The simple step of a few pins swapped, means P2 users can replace Pi's, or connect to Pi's, easily and at will. They can even bridge 2 Pi's if they want to.
It is in everyone's interest to have P2 ramp as quickly as possible, to as many users as possible.
It means classes can have a collection of Pi Hats/Bonnets, and any mix of Pi's and P2D2Pi's to teach with.
I'm not really following. Pi has many models, and Pi Zero is smaller than P2D2.
The pin headers, which are what matters here, are exactly the same product and size. both are 40 pins, 0.1".
Why add a mother board, to connect to a LCD etc, when someone will look at it and go "but this is just swapping a few pins, 40 pin to 40 pin, why do I need this ?"
To save your time, I've even provided an already routed example, showing how it can be done
P2D2 as it is, is perfect. Trying to make P2 compatible to a Pi or Arduino is where it becomes mangled and less than perfect although maybe perfect for someone's project.
Now if you were to do a P2Pi then you could build it, test it, and write code for it and post all that really useful done-it-myself info.
The P2D2Pi board design is already routed, & you can see it is not complex
I'm not following how some pin swaps, with the same-pins available, that greatly expands the usefulness of a product, can be called "mangled and less than perfect".
Indeed the "greatly expands the usefulness of a product' rather proves the exact opposite.
It is only a simply pin-swap, with an example provided....
Now tell me how is that this pin swap mangle to suit the Pi works better and is more flexible for P2 designs of all sorts? We are promoting the P2 by providing a platform for utilizing the unique features of the P2.
But I have said this so many many times before to you, if you want it that way, then build it that way, and share your work just as I share mine.
? The P2D2 is already larger than a Pi-Zero bonnet, like these
https://www.adafruit.com/product/3416
https://learn.adafruit.com/adafruit-128x64-oled-bonnet-for-raspberry-pi
and this, is even smaller still, quite nifty wee i2c display
https://www.adafruit.com/product/3527
and another one, plug ready...i2s Audio
https://learn.adafruit.com/adafruit-i2s-audio-bonnet-for-raspberry-pi
and some teensy RTCs.. also R2D2Pi ready..
https://www.seeedstudio.com/Pi-RTC-DS1307-p-3213.html
https://www.seeedstudio.com/category/Raspberry-pi-c-1010/hats-shields-c-840/Raspberry-Pi-RTC-Expansion-Module-v1-1.html (DS1307)
https://www.seeedstudio.com/High-Accuracy-Pi-RTC-DS3231-p-3214.html
DC Motor driver uses IN1,IN2,PWMA (16,18,22) & IN3,IN4,PWMB (11,13,15)
http://wiki.seeedstudio.com/Raspberry_Pi_Motor_Driver_Board_v1.0/
Yes, I did one trial variant that was like that, but once done, it seemed silly to have 2 x 40 pin headers, almost the same, wastes board space, and adds the risk of which do users plug into ?
One of P2D2's appeal, is the very compact size.
Valid point, but if you look at the example images, the castellation connectors are still very much pin-linear, so I do not imagine any issues routing a P2D2Pi to parallel LCDs.
The Pi connector is already rather scrambled in order, and most IO is done via i2c/SPI/UARTs, there is very little wide-parallel code out there.
With modules claiming 128MHz SPI, there seems little need for parallel bashing. I'm fine with the subset of HW i2c/SPI/UART, as that's where the activity is (see above examples).
Even the i2s bonnet can drop onto P2D2Pi header.
Thus I finally chose to focus on Peripheral mapping, and keep all P2 pins linear on castellation (for the reason you mentioned), and given P2 pins are all fully-soft, that's really no big issue.
The lowest level software code is clearly going to be quite different anyway, as a P2 UART ASM is very different from Pi Hardware registers.
Higher level code should be highly portable between P1 and P2.
Yup, and it's is a great little product, which is why I've been contributing
I thought I had just done that ?
It `works better and is more flexible for P2 designs of all sorts' because it allows instant & simple tap-into a vast resource of existing boards.
There are two connectors on P2D2Pi so one can connect to any Pi-Hat/Bonnet you choose, with the other free to do other tasks...
It also means P2 will be adopted more quickly into classes.
I'm not sure why you call it a pin swap mangle ? - pcb pins do not really care what order they are in, (as long as they are routed) and it maps to an established industry standard.
History is full of standard but strange-order-if-you-look-close physical mappings.
Yes, the Pi pinout is not what would have been my personal first choice, but that standard is already now set, and is widely followed.
A P2D2Pi with the Pi pinout can be manufactured easily, just finish and send the files off to a pcb house, order the parts, and build it. We await your foray from theory and suggestion into practice and example.
P.S. I am doing what I do, do what you do.
I sent my dual compact VGA pcb off this morning. I'm hoping it will work with P2D2 too, but not 100% sure because the 2nd screen will be on P22~P26, and I'm not 100% sure whether it has to align with groups of 8 or not.
I'm sure someone will eventually make something like this too.
Yes, when I dropped the P2D2 onto the Pi I was thinking that this might be a possibility. So I dropped the SMD version onto the Pi and it fits nicely:
Yep, just think of it as a big 80-pin QUIP or SMD chip
Pete if its not too much trouble can I get you to measure the size of the castallated pads, because I'm going to mate with these, and want to use the same size pad on the mating board. Best I can tell with the ruler and magnifier they're about 50 x 40 mil. Am i close?
What size is the castellation hole, 0.7mm?
They might, but there you are trying to clone a Pi more exactly, whilst my focus is less about Pi itself, and more about easy access to the Pi resource pool that includes HAT and Bonnet, some Iisted above.
Many of those are PiZero sized, or smaller (ie already smaller than P2D2)
An appeal of P2D2(Pi) is it is only a large as it needs to be, and I like the KISS aspect of easy, direct HAT compatibility.
The more I look, the more HATs and Bonnets I find, covering a whole range of uses.
Out of a couple of dozen application areas, so far only one would not usefully plug straight into a P2D2Pi.
That's exactly the sort of batting average I was hoping for, in taking the trouble to explore a P2D2Pi layout
That would be compelling in any classroom situation, and general development bench.
Spot on at 50x40 and the hole is just shy of 0.7mm at 25mil. Are you able to import the PCAD version into Diptrace? I will update the pcad version shortly.
Maybe they will. It might depend on how well the HDMI and new die finally play out.
Given such a board comes up short on MHz, RAM, and USB and Ethernet speeds, they may decide that rather than clone a Pi, they should instead complement it, and do a `P2 as a HAT`.
That logically means ... a compact P2 board, with a Pi compatible pinout
I moved the USB connector a little closer to the edge and it's only the cables that don't fit many devices that might not push in fully but most of the cables do. The PropPlug style connector was moved closer to the edge that was also shaved back and solder mask and silk screen covers the USB flange part. Otherwise, getting ready to press the send and order button.
@jmg - I want to keep the 4 pins as part of a 5 to 7 pins connector right up on the edge.
Hmmm, you're right, and you shouldn't be because the update pcb from schematic should be assigning the VIO net and highlighting a design rule violation. However I think what is happening is that the "assign net to connected copper" was then overriding that. What a gotcha.