søndag 2. desember 2012

Ping without Pong!

Eureka! The final major mystery is solved!

Last night I got the MPG-200 working, but when I powered it up again this morning, nothing happened. It was completely dead again and the JX-3P didn't react to any of the input - just the way it has been for the last few weeks.

I opened the JX-3P again and measured the logic signals going to its microcontroller, and sure thing, they were coming through just as they did last night. Still, no reaction.

It then occured to me - what if the PG-200 sends a special message when booting up? To 'ping' the JX-3P, telling it that it's present?

I reconnected the PG-200 and this time I started the recording before turning on the power on the JX-3P. And what do you know - there, just before the first output from the PG-200 controllers, it sent two bytes: An address with the value 128 and an empty (0) data byte.

It actually doesn't send the Ping on startup, it seems it waits untill the first time a controller is changed. I have to look into it to see if this is significant. Anyway, after implementing the same scheme on the MPG-200 (or rather, just sending the Ping 1 second after startup), it works like a charm! Now the MPG-200 works every time :-D

I have however managed to consistently overloading the JX-3P by sending to many bytes. I assume that this is because I ignore the busy-line. When this happens, the JX-3P shuts down (the microcontroller at least) and it stops producing sound. It is quickly fixed by turning power off/on, but this has to be fixed.


lørdag 1. desember 2012

Finally - the MPG-200 is alive!

Success at last! Tonight the MPG-200 successfully controlled the JX-3P for the first time! The current circuit uses the same japanese transistors as the PG-200, but I am still not sure that is necessary. I have tweaked the delays between the address and data bytes (the timing in the PG-200 is about 70uS between the last low of the address byte and the first low of the data byte) and between two blocks of data (PG-200: at least 17.5mS). The current delays for the MPG-200 are 91uS and 20.4mS respectively.

Now I have to get this to work with a more custom delay (or at least drop bytes instead of queueing them up, currently I get a 'delay'-effect of sorts instead of stepping. I also need to figure out how to generate bit masks for the switches.