hi every body i need to make GUI for serial communication and I made it in c # but i have to perform image processing in C++
So do I need to to make seprate GUI in C++ or can i integrate c# gui with c++
why don't you do both in VC++.?? or C#. If thats not possible then generate a dll using c++ with necessary image processing functions and call API from C#.
If your programming a CLR application in VC++, then there is no problem. Because you can easily integrate that application to your C# app. But you can use COM Wrappers to handle both managed and unmanaged codes. You had better post this in PC Programming and Interfacing section.
My suggestion: If you are able to do image processing with VC++ then why you need C# for that simple serial communication.
can u please help me in making GUI in C++ for serial port communication....that which should be able to recieve and transmit as well
I want to make it in MFC application because i am implementing my image processing(open cv) in this...
please help
i have a working GUI in C#, and a working PIC code for 16f877A, using serial port. Works also with hyperterminal. In can call back send text and can control 2 LED. In Proteus, it works nicely.for proteus, i used the virtual serial port (COM1 and COM2). I tested it by shortening out the pin 2 and 3 of the USB serial converter, works ok. Message send is send back by the serial port. But when i tested it on the on the PIC hardware, it doesn't feed back the correct message and giving me rubbish ASCII letters. Using 2400 baud rate. Anything i am missing out? feedback is most welcome. Here is the proteus snapshot with the GUI.
if you get rubbish characters you probably have a difference in baud rate between the transmitter and receiver.
check the crystal frequency and the configuration of the PIC oscillator (oscillatior selected, postscalers, prescalers, etc) to get the system clock frequency, the UART clock divisors and bardrate counter, etc. It is always worth trying the receiver at other baud rates, e.g. 1200, 4800, etc in case you are simply out by 2 or 4 in system clock.
Manged to solved the problem. I forgot to insert the MAX232 between PIC and PC. Even if the simulation in PROTEUS allows direct connection between PIC and serial port, using actual hardaware, the MAX232 still need to be inserted in between as the level of voltages need to be look. Now my C# GUI and the PIC are communicating perfectly. Also for the PIC program, i have to use the usart.h to initialize my serial port. the link is here Basic USB-RS232 Communication with PIC Microcontrollers.