some3 wrote:I will stick to my version of mach....and alsow I think that usb devices are to slow for things like this(experience from pokeays)maby I am wrong.
The only reason I am doing thic control unit(besides from learning) is This is my diploma I want something more on my machine.
on topic
no problem I can replace the 16f877a whit the 16f877 but what will be the diferenc.
OK, i haven't practical experience with CNC machines; my knowledge comes from anything i have read and i have seen on the internet so far. For example, the last 2 years i have seen many DIY CNC machines controlled from Laptops and i know that ArtSoft's Mach3 does not run on such computers due to their integrated graphics card; therefore, in these DIY CNC machines, communication between Laptop and stepper motor controllers should be done thru a USB port. In your case - if i understand well - you already have an existing CNC machine which of stepper motor controllers are managed from Mach3, and you are looking to build an extra - industrial looking - controll system to work in parallel mode with the existing PC, so your option to stay sticked with Mach3 is absolutelly understandable

. In my case, when i will be ready - from money - to build a CNC machine i will make it controlled from the USB port of my Laptop and of course i will use a different G-Code software than Mach3. I know that LPT port is very fast, maybe faster than USB2, but i think that the communication speed does not affects the precision of machine. For me, the flexibility and portability of the CNC system is of bigger importance than processing speed. That is all.
Regarding extras of P16F887 compared to P16F887A:
1) Precision internal oscillator module adjustable up to 8MHz. No need for configuration of "OSCCON" register if the factory calibrated Fosc = 4MHz (+/-1%) is enough for your project (e.g. for driving LCDs is just fine). No need for external XTAL, so 2 more pins available for I/O.
2) Precision internal MCLR module; if enabled no need for external R - C circuit to reset the micro during start-up.
With few words, you can have 36 pins available as general I/O ports.
3) Better handling of Port B. Internal weak pull-ups are individually activated on all of 8 pins of Port B. No need for external pull-up resistors connected at switch inputs. Interrupt On Change state in all of 8 pins - individually activated on each pin - of Port B.
And much more; P16F887 is the upgrade of P16F877A which was the upgrade of P16F877.
Probably, all that might be incomprehensible for you at ths time. You will discover their value in the course (like me) when you will have the need to explore deeper the possibilities of microcontroller, working with different projects.
Regards
Fotis