Thanks Steve, thats great. Unfortunatly I've never used Pic's before and therefore I'm a complete novice. Irving and Tribbles have offered to help with the code but just wondered that as you have allready done it we wouldnt have to reinvent the wheel

Im looking at a slightly different set up where the pic is soley used for varing the vref based on the incoming step signal from Mach. If you can help any further maybe you could take a look at me my thread "Help with DIY L297 + 6203" (or some thing like that:heehee:) to save clogging up this one.

Thanks again