This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How done programming in keil

Hello Sir, I work on one project in which i control stepper through PC.I done programming in turbo C.
Now I want to used Microcontroller 89s51. i want to make programmer using parallel port & communicate using USB port.

I want to programming suppose in keil.Keil is new for me.My requiredment is i done calculation for speed control in my turbo C program,i also give the keyboard input to my turbo C program. This input is go to microcontroller though USB port.

Is it possible that many thing is done in keil programming?

Thank you.

  • you need to select a device capable of handling your requirements, then the datasheet and possibly some application notes will show you what to do.

    HOWEVER, if you have any illusion that this is "Turbo C warmed over" you better before you even touch your project read "the bible" several times and then work through, not just read the Keil "getting started guide"

    DO not attempt to run, you will break a leg, first learn to crawl, then learn to walk, and then and only then attempt running.

    Erik

    here are the links to "the bible"
    Chapter 1 - 80C51 Family Architecture:
    www.nxp.com/.../80C51_FAM_ARCH_1.pdf

    Chapter 2 - 80C51 Family Programmer’s Guide and Instruction Set:
    www.nxp.com/.../80C51_FAM_PROG_GUIDE_1.pdf

    Chapter 3 - 80C51 Family Hardware Description:
    www.nxp.com/.../80C51_FAM_HARDWARE_1.pdf

    the "getting started giude" is on your Keil CD

  • Hi everyone,
    Thanks for suggestion.But i not get my problem solution.
    I communicate between PC & microcontroller 89S51 through USB to Serial cable(dongle).
    I want to enter stepper motor speed ,keyboard keyevent& stepper motor rotation angle in keil.
    This many things enter externaly from PC.
    Is it possible in Keil C language?

    Thank you

  • C is a complete language, i.e. you can implement any algorithm as long as the hardware is fast enough and has enough resources.

    Your question should normally be - is it possible for you. Obviously, we can't answer that question for you.

  • Hi, Thanks for reply.As i heard in keil C there only send the keyboard event. I again explain my requiredment.I load program in microcontroller chip 89s51 through parallel port programmer then i communicate microcontroller through USB port in which i want to enter stepper motor speed,keyboard keyevent to rotate motor in perticular direction & also enter angle to rotate stepper motor.
    This many things enter externaly through PC & call to microcontroller to control stepper motor.

    Thank you for help me..

  • Very good. It sounds like you have an understanding of what you want your system to do; that is, the functional requirements. You are now authorized to procede with the high-level design phase. When you're done with that, post a link to the design document and we'll review that too.

  • either you heard it completely wrong, or whoever said it was talking complete rubbish - or some of both!

    Keil 'C' - like any other 'C' - is just a programming language: It knows nothing about keyboards; It knows nothing about events; It sends nothing.

    However, Keil 'C' - like any other 'C' - will allow you to write programs that can do anything you can imagine that's possible with the target hardware that you use!

    Your requirements can be more clearly listed as:

    * communicate through USB port;

    * read stepper motor speed;

    * read keyboard key events;

    * control stepper motor position (direction & angle of rotation).

    Each of these is very common in 8051 projects - a little searching will show you plenty of examples tutorials, etc.

    You are also going to have to do some work to specify the specific details of the particular peripherals you intend to use; eg,

    * what type of USB connection? (a USB-to-serial converter is probably the easiest);

    * what type of stepper motor?

    * what external cirsuits will you use to drive the stepper motor?

    * what speed sensor will you use?

    * what type of keyboard?

    etc, etc,...

  • Hi Sir,
    Thanks for reply.Actually my project is control two stepper motors through PC USB port for pan & tilt camera.So,in future video signal also there.It required data transfer speed 5 Mbps.
    *So,USB to serial converter not useful because it have 1 Mbps data transfer speed.
    *I used bipolar stepper motor.
    *To drive stepper motor i used L297 & L298 driver circuit.
    *I want to use keyboard directly.

    Thank you for help me..

  • Why send the video signal through the C51 processor? The processor is badly suited for on-the-fly video compression/decompression or image analysis.

  • Hi,
    So, What is the other option for that ?.
    Because I want to control stepper motors & 4 video signal with Single USB port of my Computer.

    Thank you for help me...

  • "I want to control stepper motors & 4 video signal with Single USB port"

    So the big question is, how did you intend to send four video signals down a single USB link?!
    Relative to that, controlling a couple of stepper motors is a trivial task!!

    :-0

    You definitely won't do that on an 8051 alone!
    You would at least need dedicated video processing hardware, with the 8051 merely performing the control functions.

  • I can see that you don't believe in giving all information at the same time.

    Your original post discusses control of stepper motors based on information from a keyboard. This is a trivial task for most processors.

    Suddenly you start to mention transmitting video data through the processor. And in the next post, you have four video signals.

    Unless you find a C51 variant with a nice hardware video module integrated, you should look for a different processor - something with good DSP support.

    On the other hand - you have not mentioned if the cameras sends out analog video, or if they contain compression logic so that the video data has already been digitized and compressed.

    Always make sure that your posts contain all relevant information.

  • "So the big question is, how did you intend to send four video signals down a single USB link?!"

    UVC (USB Video Class) spec supports multiple video streaming interfaces on a single USB device. Then, theoretically, a single USB link can carry four video streams. But I didn't examine it on Windows. :-)

    Cypress EZ-USB FX2LP has 8051 core, and it provides Hi-speed USB connection to the external video processing hardware, like FPGA.

    Anyway, it is never a beginner's project.

    Tsuneo

  • Cypress EZ-USB FX2LP has 8051 core, and it provides Hi-speed USB connection to the external video processing hardware, like FPGA.

    The OP wanted to use a 89s51, so no built-in video hardware is available...