Now remember, in UCCNC, loss of M3 (i.e. M5) will also take away M10. ......... And also in UCCNC you can't have M10 without first having M3.
Why? ... M10/M11 is the laser output.... synchronous with motion (i.e. only active when movement is present), I may be wrong (won't be the first / last time) but the two are not related (although we are trying to make them related to make use of arcOK if M205 is active.
By the way if you Google about "GOTO" in C programming there's a zillion hits about it being a bad way of programming.
.... forget about C to a point, microprocessor does not really read c, code is interprited (to assembly) and compiled.
hence the "goto" just ends up being a jump statement in assembly when you decompile the hex file (that was interesting).... [still learning at Atmel Studio there is probably a way I've not looked for, stumbled upon or found to read the assembly from an interprited c project yet]..... installed AVR Simulator in demo (just ran it the once, looks interesting, you get 30 sessions of 1hr in demo, it was just interesting to look at).
This code is based on active high inputs and outputs so if I made this circuit I'd use "pull DOWN" resistors on the inputs. With a noisy plasma environment I prefer external pull up/down resistors that allow plenty current to give better noise immunity.
Yeah, I did think about that, but it's a quick change in the code, and I was looking at a THC interface board at the same time too [it's only been breadboarded as yet, and I wanted to add a bit more to the circuit board so that I've just got one board with a reed relay for torch on, plus direct interface with the uc300, so I'll probably put a 26in IDC connector on the circuit board, but would like to circuit up the other I/O's too as it would be a waste of an output [bit more work to do hardware wise for me]
I did this code with Codevision so it's got some slight differences from Atmel Studio. I initially tried in AS but when I did the single stepping the execution went stupid as usual. I put the optimisation to off in AS then it single stepped fine but that generates really crap lengthy code and I've found sometimes it just doesn't work. I do the same code with Codevision on low optimisation and it just works. Maybe I'm thick or something but I don't know how others survive with AS.
Not used codevision, only just started using AS, expert at neither. are you running the licenced / free version? I'll have a look this evening.