I'm trying to figure out what value JAM makes the ramp LFO restart at (high or low), and if it differs between forward ramp to reverse ramp. I wrote the following code to test both ways using POT0 to set the ramp direction, but the ramp doesn't seem to "jam"...
skp RUN, START
wldr 1, 0, 4096
START:
ldax POT0
sof 1, -0.5 ;find halfway
skp NEG, REV
FWD:
sof 0, -0.05 ;slow fwd ramp
skp 0, DONE
REV:
sof 0, 0.05 ;slow rev ramp
DONE:
wrax RMP1_RATE, 0 ;set ramp direction (and speed)
jam RMP1 ;restart ramp
cho rdal, RMP1 ;read ramp (should be start of ramp each time)
sof 1.999, 0 ;scale 0.5 magnitude ramp to 1.0
wrax DACR, 0 ;output to test result
JAM
Moderator: frank
Re: JAM
Upon further investigation it seems that the compiler (at least my version of it: 1.0.1.2 - 13/11/2007) doesn't encode the JAM lfo number correctly. It encodes 53h for lfo 2 (RMP0) and encodes 73h for lfo 3 (RMP1), and it only accepts values 2 and 3 as valid. It should encode 2->93h and 3->D3h respectively according to the instruction coding in the instruction set. I was using RMP1 so I manually edited the hex file to replace 73h with D3h (and modified the record checksum to match) and sure enough JAM started working! I haven't found a newer version of the SpinAsm on the website... is there one?
Re: JAM
As far as I know the latest SinASM is 1.1.30.0 that may fix your compile issue.
www.stanleyfx.co.uk
"It's fairly straight forward, if you want to start it press start, you can work out the rest of the controls yourself."
"It's fairly straight forward, if you want to start it press start, you can work out the rest of the controls yourself."
Re: JAM
The latest version of the assembler is on this page - scroll down to near the bottom http://www.spinsemi.com/products.html
Phil.
Phil.