Thanks avra
I read many posts from you about RPI (thanks)
I used AD7190 from Analog Device for reading LoadCell. This IC convert voltage to data at a programmable update rate. In my app 100 sample per second. When a data is ready the REY pin goes Low and we have 10ms time to read data. In my tests on RPI, this 10ms is enough. I think refresh time of scheduler of Raspbian is less than 10ms.
Next, in charting of data on Tensile test, we can modify chart ofter break. Tensile testers is used for many materials and 10ms is enough for more of them. I have a Repaint_Chart procedure on my software that filter and modify raw data of initial chart.
I workd many years on bare-metal programming with 8051, AVR and ARM. But Now I want to use OS for faster development and many other benefits. I'm not student. I must make machines for living. But here is Iran and team working is very rare. I must work alone: basic design an ordered machine, draw CAD detail of every parts, send to CNC worker, assemble parts, draw schematic, draw PCB, soldering parts, initial test of circuit, initial test of machine, write software, write helps, send to costumer ...
You can see bare-metal programming is not suitable for me. I attached my code in last post. It works very well by offering AsynCall from taazz (You may use or offer to others my SPI lib that directly command to BCM2835).
I converted my Delphi program of Tensile Testers to Lazarus and it works cool on RPI( overclocked to turbo mode).
My new problem is selecting a method for data storing and manipulation: Database or Record.
Taazz say, Record is faster than Database for small softwares and my test approve it. Now I'm working on LazReport to complete my program and release version 1 to costumer ( get some money to be alive for writing version 2)
Regards