Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

CNC control in C

Status
Not open for further replies.

yass7

New Member
Hello everyone,

here I made a 3-axis CNC with 3 stepper motors (Nema17) .. I control it with an arduino UNO (library GRBL) but I would like to replace the Arduino by a microcontroller 8051, more exactly a P89LPC952 / P89LPC954. So, I would like to control my CNC with the programming language in C.

Can someone please help me or if someone already has a C program to control a 3-axis CNC? : D

For you to have a little more information on my CNC. It is a CNC mainly designed to engrave PCBs. In addition, I use UGS (Universal Gcode Sender) to control my machine in G-code. here I think you have all the necessary information in any case!


thank you !
 
thank you !
you know how to do it for me? I'm not very good at programming
First of all, I don't have any 8051 type of compilers, so can't help there. (I'm not good at C either)
Also, if you are planning top replace a Arduino with a 8051 family of chips , you have to know programming yourself, as there may be lots of debugging involved. No one can simply "do it" for you. Why change something that already works??? Just use an Arduino and Grbl code, it does work from what I see...
 
No one can simply "do it" for you. Why change something that already works??? Just use an Arduino and Grbl code, it does work from what I see...
Totally agree.. But if you MUST use outdated tech download MCU8051IDE.. Free and you can add SDCC onto it.. It compiles for virtually any 8051 variant.. The IDE also has an assembler..
 
No, just don't do it.

Leave the old 8051 to continue its retirement gracefully never to be seen again.
 
Hello everyone, the 8051 is imposed on me at school
Yes I believe it is still very popular in eastern area's, But Belgium!! I'd have thought you'd be on M3 cortex processors...
 
exactly, I live in Belgium and actually it's still popular. That's why I use it for my CNC.

so, if you know how to help me please .. it would be really nice
 
exactly, I live in Belgium and actually it's still popular. That's why I use it for my CNC.

so, if you know how to help me please .. it would be really nice

If it's a school project, then YOU need to do it - although I'm as bewildered as everyone else why Belgium would still be using antique low specification processors?. I can only imagine that it's actually some kind of 8051 development board that the school bought way back last century?.

But assuming you do want to, then simply download the C++ Arduino code, and convert it to C and to run on your processor - assuming your 8051 can meet the requirements?.
 
justly, it's my teacher who asked me to get a program from a forum. it's just to learn a new μP.

"But assuming you do want to, then simply download the C++ Arduino code, and convert it to C and to run on your processor - assuming your 8051 can meet the requirements?. "

HOW CAN I DO THAT ? do you know how to explain it to me?

thank you !
 
What kind of teachers tells a student to get a program from a forum? IMHO, a very bad one.

Mike.
 
yes I know, but he is very weird. I made him the remark but he told me that the goal was to understand the program and not learn to program
 
yes I know, but he is very weird. I made him the remark but he told me that the goal was to understand the program and not learn to program
It's impossible to understand a program if you don't know how to program. It reminds me of the time when people thought they could program a computer because they could use word.

Mike.
Also, C is C, no matter what processor it's on. Why insist on using a relic.
 
it's the teacher's pedagogy unfortunately :/

So, you know, help me or not at all? you are really my only hope!

cordially
 
How will someone else doing your work help you? You're supposed to be learning.

Mike.
 
but the problem is that the project I have to make it for the end of May, so I do not have time to learn to program.
 
Then you will fail and so you should. Being able to complete a programming course without being able to program is fraud. How is an employer supposed to know you can't program when you have passed a programming course. My advice, stop whinging and start studying. Even if you have to resit the subject you will end up a better engineer.

Mike.
 
OK no worries but the only one I want to know is this : "But assuming you do want to, then simply download the C++ Arduino code, and convert it to C and to run on your processor - assuming your 8051 can meet the requirements?. "
 
Status
Not open for further replies.

Latest threads

Back
Top