PaPirus Functions
Bill Antonia (2466) 130 posts |
I’ve recently purchased a PaPirus Hat with a 2,7 inch SPI ePaper display which is connected via a FFC and has 4 buttons connected to GPIOs 16, 26, 20, 21. So far I haven’t looked into using the display and buttons but have discovered the hat also comprises an I2C RTC, with which I have been experimenting. However, the board also has a second FFC socket, Does anyone know what this second socket does? |
Bill Antonia (2466) 130 posts |
Just discovered it’s an optional connection to a GPIO breakout board. |
Chris Hall (132) 3559 posts |
Be careful how you connect the board to the Pi. I used a stackable connector on the Pi but found that the pins were too slender to make reliable contact with the PaPiRus board. I needed to use an ordinary 40 pin male connector (the pins are a bit chunkier). I avoided the complication of the RTC and temperature sensor by getting the smaller ‘Zero’ board. In my application I already had two real time clocks, one via the GPS module and one on the Witty Pi. I was also worried about a potential IIC address conflict for the RTC between Witty Pi and PaPiRus. The RTC chip on the Witty Pi is RISC OS compatible. |
Bill Antonia (2466) 130 posts |
The board I’ve got has a tight fit on the pins. Today I’ve compiled two absolutes, one to write from the RISCOS time and date clock to the RTC and another to read the RTC into the RISCOS time and date clock. Now I don’t have to rely on NTP servers. I’ve also ordered a male header and cable so I able to stack other boards. Also have code to read the temperature sensor. Haven’t soldered the buttons yet or tried the screen. |
Chris Hall (132) 3559 posts |
Haven’t soldered the buttons yet or tried the screen. Have tinkered with my prog to suit a 2.7" screen here and would be interested to know whether it works. |
Bill Antonia (2466) 130 posts |
What GPIO module are you using? |
Chris Hall (132) 3559 posts |
The GPIO module version 1.00 (help file here ) is now in the source tarballs for the Pi so I built myself a rom which included the GPIO module (I just added it to the list of modules in the components file, as all the work to support it from the HAL has been done for the Pi). There are clues in the make file to build a stand-alone GPIO module for the Pi but I haven’t tried that yet. A rom which includes this can be downloaded here (choose Update8H). |
Bill Antonia (2466) 130 posts |
Ahh Tank’s module, got that but it’s version 0.60. Tweeked your code to accept 0.60 and had to add the path for the sprite but fell over where it checks for the cog ID, mine is &89 and after the AND &F mask would be 9 and not 2, therefore giving a “cog unsupported” message. |
Chris Hall (132) 3559 posts |
Mine is &12 and the data sheet says version 1 is &11 and version 2 is &12 and does not suggest any other possibilities. |
Bill Antonia (2466) 130 posts |
Started writing code in C, eventually received a cog of 0×12. However I had to use a slower SCLK speed, 8 was too fast, lowest divisor I could use was 16. |
Chris Hall (132) 3559 posts |
I was about to say that I set the clock divider by trial and error (max speed of the display using SPI is 20MHz) but yesterday found that there is some documentation on the raspberry pi web site that says a divider of 16 is 15.6MHz and a divisor of 8 is 31.2MHz, so line 1820 should use 16 not 8. The other thing is that lines 3530-3600 may not be quite right for the 2.7" display, see data sheet. |