Been playing with a PIC with a view to implementing a datalogger for automotive applications (see how often I get past that red bit on the tacho!). I want the functions to be accessed through soft keys and a menu system on an LCD display. I realise it's basically a state machine, but trying to get my head around how to structure this is giving me headaches. I started coding this but it's getting very complex and I'm sure that the hideous mass of nested switch statements I have so far isn't the best way to do things. Is there a standard way to do this? An example in C would be very nice if anyone knows of such a thing. Regards Mike Rigby-Jones