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

can i write c51 programs in VC++

Hi,
i have to develop a configuration control for a microcontroller. For this i developd GUI using VC++ and µc controller programs are written in Keil. I have to send data from GUI to µc programs which are written in keil, where both programs are running on same pc.But i am not able to make communication between VC and µc, and i got an idea that can i write keil programs in VC, then i did that but vc is not supportng data types of keil, is it possible to write c51 in vc compiler?
Thanking you

Parents
  • "i want to say that selected data in GUI hast to send to µvision programs at run time"

    Remember that C51 programs do not run on the PC!
    They run on the embedded 8051 microcontroller hardware.

    If you want your GUI to communicate with the running 8051 program, then you will need to implement a communication link between the GUI on the PC and the 8051 program on its embedded hardware.

    As I said in your previous thread, the simplest way to do this is probably by using an RS232 link.

Reply
  • "i want to say that selected data in GUI hast to send to µvision programs at run time"

    Remember that C51 programs do not run on the PC!
    They run on the embedded 8051 microcontroller hardware.

    If you want your GUI to communicate with the running 8051 program, then you will need to implement a communication link between the GUI on the PC and the 8051 program on its embedded hardware.

    As I said in your previous thread, the simplest way to do this is probably by using an RS232 link.

Children
  • Hi Thx for your message, but my task is nothing to do with microcontroller, microcontroller programs are written in Keil and keil will give executable file to microcontroller, but both µvision and vc programs will run on same pc.
    thanking you.

  • "data in GUI hast to send to µvision programs at run time, and receive some data from µvision."

    What data do you want to send to uVision? What do you want uVision to do with it?

    What data do you want uVision to send to MSVC?

  • HI,
    i will explain my whole work.
    We are working on wireless senseors, in this we wanted to send some data through sensors between two pc's. Each pc is connected with microcontroller and microcontroller programs are written in keil in pc, before we had to write the data which should send by microcontroller in keil ,and if we had to send some other data or new data we had to write that in keil program and we had to send that, but now we want that user can send data without opeening keil program everytime, so i developed a GUI in MSVC and in that we made buttons to set intial vallues for keil programs, so that user can set intial values and send data to µvision keil programs at run time.
    To this we have to make communication between keil and msvc. so that user can set , control µvision program via GUI. And in another side µvision has to give acknowledgement to GUI that user can do further steps.
    I hope you understand what i need.
    Thanking you
    with regards
    sheshidar

  • "we wanted to send some data through sensors between two pc's."

    I think we have a language problem here: you don't send data through a sensor - a sensor measures some physical quantity and generates the corresponding data.

    Are you trying to simulate a sensor?

    Or do you not mean "sensor" at all?

  • Hi i just said that about sensors, actually my task is upto make communication between keil and msvc.
    But i am not getting how to setup the communication between both.

  • "i just said that about sensors"

    So how about describing what you're really trying to achieve?

    I fear that there is a language barrier here, and this discussion is fruitless.

    Can you find a local consultant or expert to discuss in your own language?

    eg, http://www.keil.com/condb/

  • "my task is nothing to do with microcontroller"

    Perhaps it would be easier if you got a person who does understand the microcontroller side of this project to continue this discussion?

    After all, the people who contribute to this forum are microcontroller developers...

  • Hi,
    i will try to explain again what i am searching for,
    In my work i have MSVC GUI and µvision2 programs for µc, in µc program i have
    sfr oep1 = 0xB2;
    sfr p1 = 0x80;
    and i like to make this intialisation part from GUI,
    so for this i need to nake link between vc and keil
    thanking you

  • "i will try to explain again"

    I'm afraid you're just adding to the confusion:

    "in µc program i have
    sfr oep1 = 0xB2;
    sfr p1 = 0x80;
    and i like to make this intialisation part from GUI"


    Those are not initialisations!

    Those are symbol definitions!

    See: http://www.keil.com/support/man/docs/c51/c51_le_sfrs.htm

    sfr oep1 = 0xB2;
    defines the symbol 'oep1' to represent the SFR (Special Function Register) located at address 0xB2.

    The "0xB2" defines the address of 'oep1' - not its value!

    With the above definition, 'oep1' now behaves just like an ordinary 'C' variable:
    oep1 = 23; // Write the value 23 to the SFR
    
    x = ope1;  // Reads the value from the SFR into variable 'x'


    SFR addresses are fixed by the microcontroller hardware - you cannot just change them willy-nilly!

    Or are you designing some kind of configurable processor based on programmable logic...?

    Can't you get your embedded guy(s) to explain it?

  • Or are you designing some kind of configurable processor based on programmable logic...?"

    Yes am developing a configurable processor, in this user has to configure the µprocessor using GUI, so am saving user selected configuration data in .txt file and i µvision programs has to read that .txt file.

  • "Yes am developing a configurable processor, in this user has to configure the µprocessor using GUI, so am saving user selected configuration data in .txt file and i µvision programs has to read that .txt file."

    Then, again, I suggest that you have your GUI generate 'C' source files - say config.c and config.h
    Your uVision Project then uses these files to gain access to the configurable items.

    This is the method that Triscend used for their configurable processor; it is also the approach used by Code Architect.