Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do eurorack pmod calibration properly #1

Open
matpalm opened this issue Nov 12, 2023 · 0 comments
Open

do eurorack pmod calibration properly #1

matpalm opened this issue Nov 12, 2023 · 0 comments

Comments

@matpalm
Copy link
Owner

matpalm commented Nov 12, 2023

couldn't work out the right way to do calibration so ended up with a hack on both the verilog and training side :/

from notes ( see 2023 10 17 )

sending +5V => 20,000    ( that's from the COUNT_PER_VOLT = 4000 ) 

...

just realised that +/-5V => +/- 20_000
could be mapped to +/-5V => +/- 5_000 with  >>> 2;
and then back with << 2 ?

this works. and 5000 is close to 4096...

so can we need to rescale on the way in?

i.e. we want 5V = 16_384    ( since 16384 >> 2 = 4096 )
so we want to 0.8192

currently 16384 is 4.096V
so we want to divide everything in the data by 

in fact, even simpler....

if we map everything by >>> 2 coming in  ( and by << 2 on way out )
then we have 5V = 5000 = 0x1388 = 1.220703125

the data is based on 8V=1.0, so 5V = 0.625
so we just need to multiply all the data by 1.220703125/(5/8)=1.953125 
during training....

means the max the net will take, or output, is +/- 1.22 but this should be fine and is well with FP4.12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant