Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

gui for serial communication

Status
Not open for further replies.

jerkymotion

Member level 4
Joined
Oct 12, 2010
Messages
73
Helped
28
Reputation
56
Reaction score
28
Trophy points
1,298
Location
NEPAL
Activity points
1,824
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#.

Good Luck.
 
will you please elaborate your explanation ...because i am not expert in programming ,,,,,,,so I don't catch what you replied
 
  • Like
Reactions: ssingh

    ssingh

    Points: 2
    Helpful Answer Positive Rating
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
 
  • Like
Reactions: ssingh

    ssingh

    Points: 2
    Helpful Answer Positive Rating
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.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top