Closed rsta2 closed 2 years ago
We should enable the system option USE_PWM_AUDIO_ON_ZERO in build.sh.
By uncommenting it like below, or is there a better way?
sed -i -e 's|//#define USE_PWM_AUDIO_ON_ZERO|#define USE_PWM_AUDIO_ON_ZERO|g' include/circle/sysconfig.h
It can be defined in build.sh in the same way as REALTIME
and SAVE_VFP_REGS_ON_IRQ
. With this the option is globally enabled and the file sysconfig.h does not need to be manipulated.
Thanks @rsta2, implemented your suggestions. i2c may prove useful indeed as we may be running low on pins.
Looking at the pinout in more detail, I have the following questions:
I think we should keep the same pinout for all models of Raspberry Pi to keep things simple and because it will allow the same hat/hardware/connector to be used for all models. This means that if we want to continue support for the Raspberry Pi 1, then we should avoid pins that are not physically present on the Raspberry Pi 1.
Good point. I think we can define a pinout, which works on any RPi model, especially when we do not need SPI. Answering your questions:
I agree, if we continue to support the RPi 1, we should have the same pinout there, as it is on the other models. There is one exception: the DAC is at GPIO28-31 on the RPi 1B, that's a standard. But what, if we have to move to multi-core, because of the USB issues? Perhaps we should wait for this decision, before modifying the pinout again?
Another idea: If SPI would be an alternative interface for displays, we could easily use the SPI GPIO pins for the (currently supported) HD44780 LCD display, because both are options for the same purpose and only one display is needed.
But if we want to have a CV input using a MCP3004/3008 ADC, we also need to have the SPI interface.
There are also differences between Rev 1 and Rev 2 PCBs of the Raspberry Pi 1 Model A and B:
If we need an ADC, we might also go with an i2c one like ADS1115 or MCP3421. I'd expect only few users to be interested in this, though.
I think the Rev 1 Raspberry Pi 1 is really rare so I wouldn't worry too much about it.
As suggested in https://github.com/rsta2/circle/issues/280 I investigated the GPIO pinout of the (already known) external devices, which can be connected to a Raspberry Pi, when using MiniDexed and generated a list as a suggestion (see attached).
Two comments:
The default setting for the LCD outputs RS and RW has changed. Would need to be updated in config.cpp and minidexed.ini.
We should enable the system option
USE_PWM_AUDIO_ON_ZERO
in build.sh. This allows to connect earphones or an amplifier to the Raspberry Pi Zero (2) via GPIO12/13 using a small external circuit.pinout.txt