Jump to content

AIN module questions


logo64
 Share

Recommended Posts

Greetings

I am trying to get my AIN to work with my MidiboxSID.  I checked, and it's getting 5V - and it seems to be connected properly to the CORE.  I grounded A0-A7 on J2, J3, and J4, and left IC2, IC3, and IC4 in place.

I set the LFO1 wav. to AIN, and had this LFO modulate oscillator pitch.  I put a 0 - 3.5V staircase LFO input into the A0 input of J1, and it doesn't seem to modulate the pitch at all.  In fact, it drops the pitch really low, so you cannot hear it.  Switching back to SIN modulates the oscillator fine - AIN kills it.

Can I use MIOSStudio to check to see what's wrong?  I tried querying MIOS_AIN_LastPinsGet and then putting the input oscillator into A0-A5, hoping to see it change as I switched inputs.  It just changed from 04 05 to 05 04 (can't remember exactly what these params were).  Do I need AIN.INC?  Seems like MidiboxSID v1.7 is set up for the AIN module (ENABLE_AIN_LFO_WAVEFORM 1).

Anyway, here is a picture of my FracSid.  It is obviously a work in progress.  I didn't label anything, because it is easy to guess what's what.  Top row AIN, with two extra jacks TBD. Bottom row is reserved for AOUT whenever I get one together.  Bottom right is for SID-IN and SID-Out.

fracsid.jpg

thanks for listening to me ramble,

-gerald

Link to comment
Share on other sites

Good news, I got my AIN module working with my MidiBox SID.  Weird thing is... A0-A5 are reversed???  I'm using the SmashTV board, and in order to figure out what the heck was going wrong, I uploaded the ain_example2_v1_3 program.  This one checks POT 0 for activity.  It sat there, doing nothing until I ran an LFO into A5.  What the Heck?  I re-installed MboxSID V1.7 and tried running an LFO into A0, and when I set LFO6's waveform to AIN, sure enough, it worked??? It isn't modulating much, even though the LFO is puting out 0-3.5V.  What does the AIN module expect on the input?

What are A6 and A7 for on the board?  I have these connected to the front-panel, and they're normally grounded.  I ran a square-wave from the LFO into A6, and the modulation amount jumps every time the square wave is high.  Are these trigger inputs?  Should I connect them to 5V when they're not in use?

Any ideas on what is going on would be much appreciated.

-gerald

Link to comment
Share on other sites

In keeping with tradition, I will reply to my own post again.

There are three AIN example files posted, ain_example1_v1_3.zip, ain_example2_v1_3.zip, and ain_example3_v1_3.zip.

ain_example1_v1_3.zip

Purpose:

;    -> Sends a MIDI event (CC #7) when first pot (#0) is moved

;    -> Prints the value on LCD

This example turns off multiplexing.  If you have AIN inputs A0-A5 wired as shown in the AIN PDF, and you run this

program hoping to check your AIN board, you will find that it only responds when you apply a signal to pin 13 on

the 4051 chip.  This is input A6, NOT A0.  I thought I had a wiring problem, but if you look at the datasheet for the

CD4051B, pin thirteen is channel 0.  In fact, the channel assignments are all mucked up relative to their designation

in MBHP_AINX4_V2a.pdf.

Now, I thought I had to rewire everything... unless the _software_ untangled this mess for me.  So I modified

ain_example1_v1_3.zip in the following way so that it would be relevant to the midibox SID.

USER_Init

movlw 0x06 ; enable the first 6 analog inputs

call MIOS_AIN_NumberSet

;; use the AIN 4051 multiplexers

movlw 0x03 ; 8 bit resolution

call MIOS_AIN_Muxed

I ran the program, and put an LFO into each input A0-A5 as identified in the AIN PDF, and what do you know

- it works beautifully!  I can watch the input value oscillate slowly, exactly as it should, and it gets the input

channel number right.  So - multiplexed, the A0-A5 inputs are labeled properly.  Unmuxed, they're quite different.

I modified the Midibox SID v1.7 input from

#if ENABLE_AIN_LFO_WAVEFORM

movlw 0x06 ; enable the first 6 analog inputs

call MIOS_AIN_NumberSet

call MIOS_AIN_UnMuxed ; not multiplexed

movlw 0x03 ; 8 bit resolution

#endif

to

#if ENABLE_AIN_LFO_WAVEFORM

movlw 0x06 ; enable the first 6 analog inputs

call MIOS_AIN_NumberSet

movlw 0x03 ; 8 bit resolution

call MIOS_AIN_Muxed ; multiplexed

#endif

Minor changes, but... why would you enable 6 inputs, and then have it unmuxed?  And, shouldn't the

movlw come before the call statement?

Now my SID is capable of being modulated, and the inputs are numbered correctly.

I wish that everything were running perfectly, but... it sounds like the modulation is hopping

values from 0 to the AIN input value and back.  For example - if I run a ramp into AIN0, with

values

0,5,10,15,20,25,30,35,40,45 etc.

It seems to be modulating the pitch like this:

0,5,0,10,0,15,0,20,0,25, etc.

Really rough sounding.  The modified ain_example1_v1_3.zip shows that the CORE is getting the

input right, so I would guess that somehow, it just isn't sending exactly these values to the pitch

of the oscillator.  I can hear the pitch rise and fall, with the un-shifted note underlying it.  Kind of

like wavetable arpeggios on a SID, oscillating between pitches really fast.

Since my posts on this subject have been met with silence - I'm beginning to wonder if anyone

uses the AIN inputs as LFO's on their SID?

-gerald

Link to comment
Share on other sites

My last comment may have been right on the money... nobody uses AIN for the analog LFO waveform inputs, do they?   They just

put the CORE in unmuxed mode, and put the inputs directly onto RA0 - RA5?  That would explain why the v1.7 main.asm code

had it unmuxed, and it would explain why nobody is chiming in with answers to my AIN problems - because they don't use AIN boards

with SID's?

Ok - Just yanked the AIN board altogether, and connected A0-A5 to Core J5... and it works beautifully, absolutely beautifully!  I'm

tempted to delete this thread...

-gerald

Link to comment
Share on other sites

My last comment may have been right on the money... nobody uses AIN for the analog LFO waveform inputs, do they?   ...., and it would explain why nobody is chiming in with answers to my AIN problems - because they don't use AIN boards

with SID's?

yup i guess :-\

tempted to delete this thread...

no don't it's good/interesting to read about those things/results, i like your modular approach to the sid, especially the possibillity to modulate the sid with other control generators then the "usual" lfo's and envelopes. (different is good  ;D)

keep it up!

marcel

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...