Access from Spin to assembly arrays
IB
Posts: 3
Hi people,
I'm implementing a signal filtering application using the Propeller chip.
I have taken audio samples using assembly and I have stored them into an array also defined in the DAT section.
I want to write my application using Spin language, so I need to access the sampled data (assembly) from the Spin code.
Does anyboby know how I can do it or where I can find an example?
Thank you,
IB
I'm implementing a signal filtering application using the Propeller chip.
I have taken audio samples using assembly and I have stored them into an array also defined in the DAT section.
I want to write my application using Spin language, so I need to access the sampled data (assembly) from the Spin code.
Does anyboby know how I can do it or where I can find an example?
Thank you,
IB
Comments
The above won't work if the assembly is in another cog though. You would be dealing with offsets then!
PS. Check out the Tricks & traps Thread.
Hope this Helps!
Post Edited (bambino) : 3/23/2007 1:37:41 PM GMT
Are you sure that's right, you can't have spin and assembly in the same cog, in the same object yes but not the same cog that was my understanding.
You can write to the cog's local assembly variable before starting the cog to load it with data on start up and you can have spin routines for the object that get the data from global memory that has been moved using wrlong commands but I don't think you can get data directly from assembly to spin like that.
Graham
Graham
VAR
array
PUB
cognew(@asmstart, @array)
DAT
mov pointer, par '(par=parameter value= address of first location of array)
I thought to the memory this morning. I think I will use wrxxx command to write my samples (and really store them) in the memory and then I will recall from there.
Moreover it is better to take a look to the resources you gave me.
Thank you again [noparse]:)[/noparse]
Ivano.