sean wrote:Hello Juha,
Here is the fcd file required by Flowcode for the AT90S2343.
AT90S2343.fcd
Hi Sean,
Thank you very much for your kindness! I have myself a demo version only, so I will forward it to a more advanced junior of our club who is studying electronics with a full version of it in his school for compiling my Flowcode original to 2343 hex.
Meanwhile, I practised making a two channel servo pulse mixer with no previous practise of microcontroller coding. I really could make a simple program in a few days with Flowcode, so I must admit it is quick and easy to learn even for an old and slow man like me!
The mixer appers to work well in simulation with the ATmega32 chip of the demo. I made this primarily for twin motor electronic speed control steering of motor driven electric models, like robots or microflyers. It works as a servo mixer for V-tail planes, too, but as an ESC mixer it gives servos twice as large travel as a standard V-tail mixer, so be careful with it.
Servo / ESC mixer with Flowcode
Because I did not know how to measure pulse time, I made the program measure incoming pulses by counting how many loops the program makes while the pulse is coming. Outgoing mixed pulses are timed by same method, assuming that the loop frequency does not vary considerably. No high accuracy is needed for this application, so a few percent variation is tolerable.
Anyone is free to use it or edit and improve it for his needs. Attached are the Flowcode AVR original and C, hex and assembler files that were compiled by the program. I have not tested them in any chip because I have not built a programming board yet.
The Atmel chips are supposed to have very similar cores, so I suppose the Flowcode original can be compiled to other Atmel chips, too? Maybe even the files for ATmega32 could even be used to other Atmel chips 'as is'?
I configured the inputs and outputs of CH1 and CH2 to pins that are found in all Atmel chips so the same Flowcode source should easily suit other chips, too. The fifth pin output is for measuring the program loop frequency, to later set min and max limits for the abt. 1 ... 2 mS servo pulses, if needed.