Arduino IO Expansion
- blazini36
- Online
- Platinum Member
- Posts: 937
- Thank you received: 150
Yeah I make plenty of PCBs, I tend to make one or two revisions, get everything working, and then stuff it on the shelf because I stop working on whatever it was mean for.Nice setup old chap, puts my merger efforts at PCB design to shame.
I remember there was a thread about the BSPI thing, tried searching but couldn't find it.
That one was for a pick and place machine I made that I wanted to get working with OpenPnP on top of LinuxCNC. I did get it moving around but I was having too much trouble getting both OpenPnP and LinuxCNC to play nice......so on the shelf it went. I don't really have the attention span to try to get LinuxCNC fully integrated for a PnP by itself but I'm sure it can be done, the guy who does the Mitsubishi servo cards managed to do it.
These break out boards intended for Arduino Connector have probably been sitting around for like a year now. Had to bodge out a couple of mistakes on both the Mega and Teensy 4.1 versions but it'll be good enough to get my control panel finally working. Then I'll go back and make a (hopefully) final revision.
Please Log in or Create an account to join the conversation.
- cornholio
- Offline
- Platinum Member
- Posts: 1136
- Thank you received: 375
Now that the RPI5 has a driver suitable for the 7c81, it’s time to see if this BSPI thing works on the clone I put together.
I’ll use your thread as a reference, print out some of the man pages, 7i65 code, some data sheets and get the highlighters out. I guess a I’ll have to build the bit file as well.
Please Log in or Create an account to join the conversation.
- AlexMagToast
- Topic Author
- Offline
- Premium Member
- Posts: 90
- Thank you received: 69
Yes, I figure it is dangerous if the Arduino changes States by itself, at least if People decide to connect other things than LED Lights in Buttons to the Output pins. I implemented new settings in the new version that allows to define behaviour if the connection is lost.Right now I'm just looking at how Arduino-connector handles connection states. It seems that even the normal outputs don't reset when LinuxCNC is closed so things that were previously on (like LEDs) stay on. The same happens with the I2C outputs so I suppose it's expected. Not sure if that's the intended behavior but I've trying to figure out how to reset all outputs (pull low) on disconnect. It's a bit hard to debug since there's only 1 serial connection referenced and it's taken over when LinuxCNC connects, but I have another serial port I can direct debug prints to.
You can create a pull request if you want and I will merge it into the project.Other than that it all seems to work pretty good, I found a blocking delay in the comalive function that was creating a bit of delay. I replaced that with a timer and it works much better. That plus the tweaks mentioned in the git issues, it's pretty responsive now.
Once I get done putzing around, I'll clean up my code a bit and upload it somewhere.
Please Log in or Create an account to join the conversation.
- blazini36
- Online
- Platinum Member
- Posts: 937
- Thank you received: 150
IIRC the problem with BSPI is that it was rarely ever used after it was written. I guess one lesser known Mesa card used it and I could only dig up a single ancient thread about it. I recall I was asking about it and toward the end of the thread it clicked in my head how the data packets work......then I shelved it. Maybe I'll get back to it one day.As much as we had a difference of opinion our work flow seems to be on similar lines.
Now that the RPI5 has a driver suitable for the 7c81, it’s time to see if this BSPI thing works on the clone I put together.
I’ll use your thread as a reference, print out some of the man pages, 7i65 code, some data sheets and get the highlighters out. I guess a I’ll have to build the bit file as well.
Please Log in or Create an account to join the conversation.