So I know this is an old thread, but I was thinking about starting up my own chronicling my Megasquirt adventure on my car and wanted to read through this one briefly again to get an idea of what was already out there. Regarding knock control, I have it set up on my car right now running an MS3X with the internal knock module (well, a clone module, but it's the same chip).
The frequencies are based on physical dimensions, so nothing too black magic. There are several calculators online for it. Bore diameter is pretty much what determines it. The decision you make from that point is whether you listen for the primary frequency or one of the later order harmonics (for instance, if your primary frequency was 100 Hz, you could also pick up knock listening at 200 Hz). There are other settings and methodologies/theories for how to actually tune them besides that. I tried pulling some stock values out of an HP Tuners tune for my engine, but they ended up causing more issues so I went back with more generic theory values. I can pull up my tune and get some screenshots later if anyone is still interested all these years later. I'll probably still start up my own thread as I've learned a lot over the years and felt like sharing for anyone interested in hearing.