bill Posted September 17, 2006 Report Share Posted September 17, 2006 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#msg47353I 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 !!! Quote Link to comment Share on other sites More sharing options...
Jaicen Posted September 17, 2006 Report Share Posted September 17, 2006 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. Quote Link to comment Share on other sites More sharing options...
bill Posted October 3, 2006 Author Report Share Posted October 3, 2006 Hello,To be honest, I think a decade counter would have no trouble at all counting offYes 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 ?www.ee.washington.edu/stores/DataSheets/74ls/74ls90.pdfI 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 :)thankshere is how i used it : Quote Link to comment Share on other sites More sharing options...
Jaicen Posted October 3, 2006 Report Share Posted October 3, 2006 I imagine that it just needs the reset pin to be pulsed low. I'll have a look at the datasheet after I get home from work and see if I can help. Quote Link to comment Share on other sites More sharing options...
stryd_one Posted October 3, 2006 Report Share Posted October 3, 2006 Looks like the reset pins are active high (notice there's no line over the top of the pin name to indicate it's active low) but the datasheet says they're ANDed so you'll want to strobe them both or keep one always high. Quote Link to comment Share on other sites More sharing options...
Jaicen Posted October 3, 2006 Report Share Posted October 3, 2006 Yep that's right. You need to hold one pin high, then pulse one low to for it to reset. Quote Link to comment Share on other sites More sharing options...
TK. Posted October 3, 2006 Report Share Posted October 3, 2006 Sidenote: I'm not 100% sure, since I never tried this, but it's maybe worth for an experimentThe 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 T3CONFrom 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 RC0Just 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.