Hi , i am developing a configuration control GUI using VC++. And the microcontroller programs written in keil , my work is to call the keil programs from GUI, and send the user selected intial values in GUI to keil , and get acknowledgement from keil to user, then user can send data to keil , the which microcontrooler has to send to receiver microcontroller, and on other hand microcontrooler will receive data and that data will send to microcontroller program via serial port, than that data which microcontroller get should send to GUI. my work is to make communication between keil and vc++, nothing to do with keil program communication with microcontroller, if any one have any idea please guide me. Thanking you with regards sheshidar patnam
Think about a standard modem. When you buy it from the shop, it comes with all its parameters set to default values. These are the values that came from its source code; if the manufacturer wanted to change these, he would have to change the source code & re-compile it. When you connect the modem to your PC, you can change settings by issuing AT commands; eg, you can turn Auto-Answer on or off; set the baud rate; etc, etc,... The microcontroller within the modem has some software to receive & interpret these commands, and adjust its data variables accordingly. You could implement something similar, allowing your embedded code to receive data at run time. Alternatively, if you only want to make changes at compile time, you could have VC++ generate the 'C' source file that contains these settings; eg, in VC++
: : fprintf( c_file, "char a = %d;", value_for_a ); fprintf( c_file, "char b = %d;", value_for_b ); fprintf( c_file, "char c = %d;", value_for_c ); fprintf( c_file, "char d = %d;", value_for_d ); : :
: : char a = 1; char b = 2; char c = 3; char d = 99; : :