Jump to content

Sync


bill

Recommended Posts

Hello,

I need help to solve a problem, that is not purely MB oriented, but...

I'm working on syncing my gb to mios, maybe you now that. http://www.midibox.org/forum/index.php?topic=7205.msg47353#msg47353

I must scan inputs to read the pulse sync : i know how to do that, with unmuxed AIN, or DINs, i have good results.

My gb sync signal is made of 8 short consecutive pulses, 0.1msec pulselength.

It's too short to be read with mios and my prog, and i dont need to read those 8, but 1.

So, i would like to count those 8 pulses and send 1. I think it's easily feasable with a TTL counter chip, but do you know if it could work that fast, and maybe do you know the name of that chip ?

Do you think 74LS93 is ok for that ?

Thanks !!!

Link to comment
Share on other sites

Have you tried using a capacitor and a flip-flop? I imagine that if you had something like a 10uF cap to ground across the input then it may be able to smooth out the single pulses enough that the flip flop sees only a changing level. When you say the pulselenght is .1msec, is that 0.1on, 0.1 off??

To be honest, I think a decade counter would have no trouble at all counting off .1ms pulses but it's maybe something to consider.

Link to comment
Share on other sites

  • 3 weeks later...

Hello,

To be honest, I think a decade counter would have no trouble at all counting off

Yes it works, the datasheet say input rate up to 32MHz !!!

So i used a 74LS93 to change the gb sync to sync24. it works just great !!

Then i wanted to slow down the rate to make the job easyer for MIOS (to be sure to read the sync with no loss), so i used a 74LS92 (divide by 12/6/3 counter)

so i have a kind a sync6 (6 pulses per quarter note)

I'm very happy with it but i have one problem :

I dont know how to reset the counter.

I guess it's around pin 6 and 7, but i dont know what to do.

Do i have to set both 6 and 7 to +5v ?

ls92.png?

www.ee.washington.edu/stores/DataSheets/74ls/74ls90.pdf

I guess R0(1) and R0(2) are Reset inputs, but i dont know how to connect them.

Right now, they are set to Ground (else it do not count)

I know this is pretty 'off topic', but please help me if you know how to :)

thanks

here is how i used it :

74ls92.png?

Link to comment
Share on other sites

Sidenote: I'm not 100% sure, since I never tried this, but it's maybe worth for an experiment

The Timer() function will be triggered on a Timer3 overrun. This Timer can also be clocked from external (RC0 pin). According to the datasheet, you only need to set the TMR3CS flag of T3CON

From the software side this means:

  - disable interrupts (INTCONbits.GIE = 0;)

  - initialize the timer so that it is executed with each clock (MIOS_TIMER_Init(0, 0))

  - enable external clock (T3CONbits.TMR3CS = 1;)

  - enable interrupts again (INTCONbits.GIE = 1;)

now Timer() should be called on each rising edge on pin RC0

Just want to mention it again: I never tried this out! So, it could be, that some additional configuration is required, or that MIOS overwrites something which prevents you from using the external clock pin - I only remember, that MIOS_TIMER_Init overwrites T3CON completely, therefore I proposed to change the TMR3CS function after this call, and to temporary disable interrupts in order to prevent that the Timer() function will be called endless so long it is clocked from internal (in this case your core will completely hang up, and a watchdog reset should happen after some seconds)

Best Regards, Thorsten.

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...
×
×
  • Create New...