[quote=480630:@Eugene Dakin]I am seeing general issues from high frequency Bit-Banging (reading a pressure sensor with millisecond data), to communication with integrated circuits (the binary hand-shaking shows up with lower and higher duration times on my oscilloscope and prevents successful hand-shakes), to something simple like the timing on a stepper motor (slow motor turn rates and the motor stopping). Again, checking the oscilloscope shows the bits are not evenly spaced.
Running the exact same programs on a competitive IDEs in other languages works well. Xojo programs on the Raspberry Pi work better when global variables are used and the performance is poor. Shrug, I don’t know what else to say?[/quote]
I would have guessed, without trying it ;), that the main problem on the Pi would be the OS and the fact that none of these are real time so your program could be held out at any moment for an unknowable amount of time.
I would definitely do the writing in a tight loop of xojo code with the disable background tasks pragma to stop any of that, but that wont stop the freeing of memory.
i wonder if it would be possible to do the low level communication treating the bit banging as a serial port? Since it does not have the clock pulse it must act as one. I know the pigpio stuff has the ability to use any pin as a serial port and is very configurable for speed and format and such. It might be possible to make something that already handles the timing in the kernel like that do it. I dont know if the format of the data would make itself possible or not of course. It might be worth experimenting with as it would be fairly easy to setup.
If you need a separate app or a helper app you can do that too. Perhaps a very simple console app with nothing else happening in it in Xojo would work to send the data and you can start it up via an async shell in your app and pass it packets of data through the shell pipe or an IPC Socket or something. If you need to go with a completely different language or a small compiled C program to do the low level bit banging then it too could accept data via its pipes and send it down the proper pin and be launched from the Xojo app. Any of that would be simpler than starting over in another language completely.