Hello,
I’ve been very interested in sync24 feature in the clockbox program.
I’m a chiptuner, and play a lot with gameboys and the LSDJ program. http://www.littlesounddj.com/lsd/
LSDJ provide a sync feature, similar to sync24, with the difference that the gameboy do not wait for pulses,
but bytes (so 24 bytes per quarter notes)
In clockBox, you just have to change the SR_Service_Prepare() func so it send 8 pulses (or 11111111 )
void SR_Service_Prepare(void) __wparam
{
// this function is called each millisecond
// we are using it to output the MIDI clock at Pin D.4 for 1 mS
if( mclock_pin_state.CLK_REQ ) {
mclock_pin_state.CLK_REQ = 0;
//Send 8 pulse, so LSDJ can read a byte !
PORTDbits.RD4 = 1; PORTDbits.RD4 = 0;
PORTDbits.RD4 = 1; PORTDbits.RD4 = 0;
PORTDbits.RD4 = 1; PORTDbits.RD4 = 0;
PORTDbits.RD4 = 1; PORTDbits.RD4 = 0;
PORTDbits.RD4 = 1; PORTDbits.RD4 = 0;
PORTDbits.RD4 = 1; PORTDbits.RD4 = 0;
PORTDbits.RD4 = 1; PORTDbits.RD4 = 0;
PORTDbits.RD4 = 1; PORTDbits.RD4 = 0;
} else {
PORTDbits.RD4 = 0;
}
}
As simple, and it works GREAT !!! 8)
About the sync 24 :
On the clockbox example, pulsewidth is 1ms long,
I’ve read somewhere that the pulse length sould be at least 2ms, so any device could read it (some beatbox are expecting this, so maybe you have to change the original code a bit to fit your hardware)

