How to start for a beginner

Hardware questions and issues with the FV-1

Moderator: frank

Post Reply
Rebel_88
Posts: 4
Joined: Sun Jul 13, 2014 1:46 am

How to start for a beginner

Post by Rebel_88 »

Hi everyone yesterday I discovered this wonderful chip and I'm trying to understand how it works. I spent a day on the spinsemi site to learn the architecture and the programming language.
But for a beginner like me is not easy to approach tho this chip because there is not a guide or a reference pdf ( or I'm not able to find it).
For example the section "Application" is very useful to undersand the potentiality of the FV-1 but is for an introduced user.
Is there a guide or a step by step tutorial to use to learn how to program this chip?

Thankyou for your time.
quintosardo
Posts: 4
Joined: Tue Jul 15, 2014 3:11 am
Location: Italy
Contact:

Post by quintosardo »

I think the variable is if you know a bit of DSP or not.

If you have DSP basics, using an example and understanding it with the manual opened works great!

If are absolutely new to DSP, a first order lowpass filter is a great starting point.
Rebel_88
Posts: 4
Joined: Sun Jul 13, 2014 1:46 am

Post by Rebel_88 »

I'm studying electronic Engineering and i have basic knowledge of signal analisis, filter ecc i have programmed pic and other components and i know a little bit of fpga,but is the first time with a DSP.
I'm doing what are you saying,I'm studying example by example with the manual, but if there were a better way to learn is welcome.
Digital Larry
Posts: 338
Joined: Mon Nov 12, 2012 1:12 pm
Contact:

Post by Digital Larry »

I have to agree with you that learning Spin ASM is challenging.

If you read enough of the various pieces of information (some of which is hiding in Forum posts) you will eventually start to get the hang of it. I have been doing it for about two years and it's finally starting to make sense.

Make sure you check out the Free Programs, Knowledge Base, and ask questions here at the Forum. There are some typos here and there and some things could have been made clearer if for example, a code snippet was placed along side of the signal flow diagram.

Probably the most important instructions to understand are RDAX and WRAX. These are used in every program I can think of.

I think a fixed multi-tap delay is about as simple as it gets and is a good place to start. No filter equations or Z-transforms involved. Later tonight I'll post some code and offer a line by line explanation.
Digital Larry
Posts: 338
Joined: Mon Nov 12, 2012 1:12 pm
Contact:

Post by Digital Larry »

Image

Generates (after some editing) this code:

Code: Select all

RDAX ADCL,0.7160000000   ; read signal from ADC left input multiplied by 0.716
WRA 0,0.0                          ; write to RAM address 0 and multiply acc by 0,0 (clear it)
RDA 1222,0.244                  ; read address 122 multiplied by 0.244
RDA 2042,0.617                  ; add to address 2042 mutiplied by 0.617
RDA 3684,0.179                  ; add to address 3684 multiplied by 0.179
RDA 5326,0.567                  ; and so on
RDA 8609,0.249                  ; and so on
RDA 10270,0.07                  ; and so on
RDAX ADCL,0.5000000000   ; mix all taps with 0.5 * input signal
WRAX DACL,1.0000000000  ; store to DAC left
WRAX DACR,0.0000000000  store to DAC right
RDA and RDAX perform by accumulating stuff while multiplying certain things by certain values to make filters, delays, etc.

After RDA and RDAX, the target memory, control, or register source is multiplied by the second parameter and added to the previous contents of the accumulator. To clear the accumulator you can use the CLR instruction.

The series of RDA instructions pick off and mix together the 6 delay tap points spread along the delay RAM's length, each tap multiplied by a settable gain level to create more subtle delay patterns and variations.

WRA and WRAX on the other hand, use the second parameter to adjust the accumulator AFTER the writing takes place.

In this sequence:

Code: Select all

WRAX DACL,1.0000000000  ; store to DAC left
WRAX DACR,0.0000000000  store to DAC right
after the first WRAX, since the second parameter is 1.0, the accumulator is unchanged. The same value gets written then to DACR, the right output (mono output) and then the accumulator is multiplied by 0.0, which clears it.

The first parameter of the RDA instruction is the memory address to read for each of the six taps of the simulated MN3011. This number is calculated as a fixed percentage of the total allocated memory length in the control panel.

If you wanted to use POT0 as an effects return control for the summed multi-tap delays, add the MULX POT0 line as shown:

Code: Select all

RDAX ADCL,0.7160000000   ; read signal from ADC left input multiplied by 0.716
WRA 0,0.0                          ; write to RAM address 0 and multiply acc by 0,0 (clear it)
RDA 1222,0.244                  ; read address 122 multiplied by 0.244
RDA 2042,0.617                  ; add to address 2042 mutiplied by 0.617
RDA 3684,0.179                  ; add to address 3684 multiplied by 0.179
RDA 5326,0.567                  ; and so on
RDA 8609,0.249                  ; and so on
RDA 10270,0.07                  ; and so on
MULX POT0                         ; multiply summed taps by POT0 value
RDAX ADCL,0.5000000000   ; mix all taps with 0.5 * input signal
WRAX DACL,1.0000000000  ; store to DAC left
WRAX DACR,0.0000000000  store to DAC right
Rebel_88
Posts: 4
Joined: Sun Jul 13, 2014 1:46 am

Post by Rebel_88 »

Hi thank you for your answer and your explanation i appreciate it very much.
Now I'm waiting my FV-1 Chip so i have to study without it, only by theory.
I think it is like a MIPS programming language, at the beginning it is not so clear and easy to understand but with the help of this forum it should be possible.
Your example is very clear and helped me to but I know I have to study a lot to create my own idea.
There are other examples of this kind on this forum ( i mean code + explanation in your way) from where i could start?
Thank you for your time.
Digital Larry
Posts: 338
Joined: Mon Nov 12, 2012 1:12 pm
Contact:

Post by Digital Larry »

Rebel_88 wrote: I think it is like a MIPS programming language, at the beginning it is not so clear and easy to understand but with the help of this forum it should be possible.
The examples with the most comments are in the "Free Programs" area. You should combine this with a thorough and repeated reading of the Knowledge Base and Assembler manual. I don't know of any shortcut other than to take a specific algorithm (smaller the better) and understand thoroughly how it works. Spin's instruction set is not like a general purpose micro. They are very specifically set up to optimize audio processing algorithms for the most part.
Rebel_88
Posts: 4
Joined: Sun Jul 13, 2014 1:46 am

Post by Rebel_88 »

Yes you are right, it is not general purpose.
I have to study a lot to understand how it works and create a good project.
Thank you for your help and your time.
ice-nine
Posts: 192
Joined: Thu May 24, 2012 9:03 am

Post by ice-nine »

I'm no expert at the Spin ASM programming but have found the easiest way I began was to use one of the internal programs that are downloadable from the website.

I used the chorus/reverb for a first example and to help me understand what was going on I stripped out the reverb leaving just the chorus, of course a first attempt at this resulted in a program that just didn't work.
It was all about finding out what parts of the coding did what, eventually ending up with a working chorus it was quite easy to start looking at what made it tick, along with the application notes things slowly started to make sense.
Post Reply