Pi accelerator I2C

This section is for discussing everything about Next hardware and latest updates.
Post Reply
User avatar
varmfskii
Posts: 183
Joined: Fri Jun 23, 2017 1:13 pm
Location: Albuquerque, NM USA

Pi accelerator I2C

Post by varmfskii » Tue Sep 18, 2018 11:23 pm

I see on the new distro there is some support for communicating with the Pi via I2C. Does anyone have a demo or clear documentation as to how this is done?
Backer #2741 - TS2068, Byte, ZX Evolution

User avatar
TheSMoG
Posts: 31
Joined: Mon May 29, 2017 5:07 pm

Re: Pi accelerator I2C

Post by TheSMoG » Thu Sep 20, 2018 6:01 am

Tim Gilberts is working hard on producing demos (there are small ones already in the distro) as well as adding documentation as he goes. Documentation will be found under /docs/ in the distro so keep an eye on the evolving distribution and the (newly added changelog) for that!
Phoebus R. Dokos
ZX Spectrum Next Manual author/editor
TBBlue Distribution Maintainer Latest images & TBBlue git repo on gitlab.com
WASP/ZXnextHUB Member
All Sinclairs All The Time :D :lol:

User avatar
varmfskii
Posts: 183
Joined: Fri Jun 23, 2017 1:13 pm
Location: Albuquerque, NM USA

Re: Pi accelerator I2C

Post by varmfskii » Thu Sep 20, 2018 2:53 pm

the only "demos" I could find were the pi2c dot command (on the zx next side) and the pig2i2c (on the pi side) and no matter what I do on the pi side any pi2c command results in "No ACK on address select. Probably no PI at 0x42"
Backer #2741 - TS2068, Byte, ZX Evolution

Alcoholics Anonymous
Posts: 495
Joined: Mon May 29, 2017 7:00 pm

Re: Pi accelerator I2C

Post by Alcoholics Anonymous » Fri Sep 21, 2018 3:22 pm

You need to be listening on the pi side. Tim is the one to ask about it as he's the one that has been playing with it.

The i2c on the next side is connected to the rtc clock but is also connected to a couple of pins on the pi connector so the pi can sit on the i2c bus as well. The main interface between the next and pi is via spi however because this communication is intended to be done with hw assistance. i2c is bit-banged.

That's the limit of my knowledge as I haven't play with it but it's at least another response :) Maybe when Tim surfaces from his day job he will stop by.

User avatar
varmfskii
Posts: 183
Joined: Fri Jun 23, 2017 1:13 pm
Location: Albuquerque, NM USA

Re: Pi accelerator I2C

Post by varmfskii » Sat Sep 22, 2018 2:27 am

I am listening on the pi side thus the reference to pig2i2c, but it doesn't seem to matter.
Backer #2741 - TS2068, Byte, ZX Evolution

User avatar
Timbucus
Posts: 223
Joined: Tue May 30, 2017 7:43 pm

Re: Pi accelerator I2C

Post by Timbucus » Sat Sep 22, 2018 10:26 am

Sorry, as in the notes this is a work in progress as a bit of a side hobby as the i2c bus was added at a late stage - the the PI does not yet send the ACK back down the wire which is why you have to use the -d option on pi2c - note that the real early RTC code did the same thing. That said, it should see the data you have sent and print out the strings of bytes beyond the -wHH{HH} etc. If you start the X server on the PI you can also use the excellent PISCOPE to watch the i2c bus... (best the turn off the GPIO pins you are not using in the menu).
I'm Infinite Imaginations when not in work... PAWS for thought.

Post Reply