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 ?
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.
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.
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.
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)