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

problem in receiving the text serially from port p3.o of At89c51 using pointer.

Hi! i am new to this forum. But still i am sure that this is the place where i could solve the problem regarding my code written in keil c.

Actually, I am working with the voice controlled project. I am sending the speech that has been converted to text through Usb to rs232c cable to p3.0 port of Atmel AT89c51 microcontroller. Now, I am controlling the microcontroller using the keil c. So, I need to receive the text serially using pointers or any other mechanism and the extracted word shoud be compared to either of the commands like right, left,stop,back and provide the appropriate logigic values to motor driving circuit to control the motor. So i have worked with this keil for long time but still i am not getting the respose from the microcontroller side toward the motor driving circuit.

So please help me in moving my project forward.
cheers.

Parents
  • set it up with circular buffers
    Thats a good piece of advice. But here the OP is struggling with more simpler issues. So IMHO, that we suggest him to implement circular buffer only once he is very clear with the basics of arrays and pointers.

    ***,
    So without return type of interrupt service routine, i can't bring back the received text to main fnction for comparison
    Ya. So, you need to learn the "Variables and their scope".

Reply
  • set it up with circular buffers
    Thats a good piece of advice. But here the OP is struggling with more simpler issues. So IMHO, that we suggest him to implement circular buffer only once he is very clear with the basics of arrays and pointers.

    ***,
    So without return type of interrupt service routine, i can't bring back the received text to main fnction for comparison
    Ya. So, you need to learn the "Variables and their scope".

Children
  • you need to learn the "Variables and their scope"
    so that you understand what are global variables and how to use them, thus define global array where you can store your received data and then process it in other functions.

  • Give up your dream of being a cool programmer.

    Be a rice farmer instead.

  • Dear Ching Shu,
    Its easy to comment on others. But i hope u had a same problem at the beginning of ur coding. At that period u might b the same situation person seeking for a help and if someone had told u the same statement be a rice farmer how would u feel at that moment.
    So if u know the program share it but never become oversmart by making others down.
    So till now u haven't provided any of the example regarding my problem. The only 1 who has provided me note examples is Mr Pier only.
    As my intention is not to become a cool programmer but i am just learning n trying to add extra code that might help to move my project forward.

    Being Oversmart is a dangerous thing ..

  • You should not say the things until you are as clever as me.

    You have a long way to go.

    I have written more than 17 applications in my year and I am always top of the class.