With a little help from my friends.....
Pliers
Posts: 280
I have written a motion control program in assembly.
It checks sensors and controls the motor direction and speed.
The motor is controlled with acceleration and de acceleration subroutines.
It is my most extensive program ever. I’m looking forward to posting the project when finished.
My next step is to build in some diagnostics concerning the motion, but I’m having difficulty getting the data out of the assembly program.
I was hoping someone would show me how to make this sample program work.
No rush on this request.
Very best regards, Steve.
It checks sensors and controls the motor direction and speed.
The motor is controlled with acceleration and de acceleration subroutines.
It is my most extensive program ever. I’m looking forward to posting the project when finished.
My next step is to build in some diagnostics concerning the motion, but I’m having difficulty getting the data out of the assembly program.
I was hoping someone would show me how to make this sample program work.
CON _clkmode = xtal1 + pll16x _xinfreq = 5_000_000 OBJ pst : "Parallax Serial Terminal" var byte cog byte Data long Data1 long Data2 Pub Main data2 := 500 pst.Start(56000) repeat Data := pst.charin if data== "a" 'I send the character "a" from visual basic pst.char("Q") 'I get back a"Q". Simple testing for my comunications if data == "b" 'Now when I send a "b". I want it to start a cog that returns data. cog := cognew(testing,0) pst.dec(data1) pst.dec(data2) cogstop(cog) dat testing org 0 wrlong testData1, data1 ' trying to get data back to the spin program wrlong testData2, data2 ' trying to get data back to the spin program jmp #testing testData1 long 123 testData2 long 456I don’t have any problems with the visual basic interface.
No rush on this request.
Very best regards, Steve.
Comments
To get multiple values out, I will need to do an array.
oops ! Parallax changed the look and feel of the forum.
I hope this will not change every week as a new fashion^2
Somehow the getting started sticky-thread vanished
took me some searching to find this again
Assembley-Language-Help-List
I tried to find that PASM-beginner tuotrial that shows how to exchange data between SPIN (=HUB-RAM and PASM (COG-RAM) but I could not find it
EDIT it's more or less hidden behind the Propeller-HYDRA-Key-Thread-Index
best regards
Stefan
I want LED16 off and LED18 on.
I get LED16 on and LED18 off.
Now back to conquering the world.