Create GUI using Visual Basic/any software and program into PIC18F2550 through USB

In summary, the speaker is seeking advice on creating a GUI using Visual Basic to get input from the user and then load it into a PIC18F2550 through USB to control a servo motor for an ASRS system. They are unsure if they should use Visual Basic for all the programming or use software like MPLAB for loading the input into the PIC. The suggested steps include programming the PIC first, determining a protocol (such as UART), and using a serial communication control in VB.
  • #1
syee10
27
0
I am sorry because i recreate this post because the old thread is missing =(

I need to create a GUI using Visual basic to get input from user.A simple button click will be enough for the GUI.After i get the input, i need to load the input into PIC18F2550 through USB. This will then control my servo motor as i am creating an ASRS system. So anyone here can give me some advices/guidelines on how to create the GUI and how am i going to load the input from user into the PIC?
I need to use Visual basic to do all the programming or program it separately by using Visual basic to create GUI and use software like MPLAB to load my user input into PIC?

St3
 
Engineering news on Phys.org
  • #2


This may be a little bit complicated depending on your experience. There are a number of different things that must be done to accomplish this.

1) The PIC should probably be programmed first so that the GUI creation will be easier. You'll need to determine what type of protocol. You said you wanted USB so you'll have to pick out a PIC that supports USB. I don't know if there are any that would be usable in a PICKIT 2 or whatever you may be using. So the other option would be to use something like this from Microchip: USB-to-UART (http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en546923). Then all you need to do is program the UART serial from whatever PIC you use. Almost every PIC made has UART support.

2) If you end up using UART you must have a protocol, you know a set of commands that will be sent across the bus. This can be anything you want. You'll just have to be able to read it from VB.

3) Finally create the GUI. There is a serial communication control somewhere. I can't remember exactly where it's at but it would basically be serial port (I think). This you may need to do more research on.

Hope this helps at all. Email me or check out my blog for other information

--------------
Justin Coulston
justin.coulston@gmail.com
TheModernEngineer.blogspot.com
 

1. How do I create a GUI using Visual Basic?

To create a GUI using Visual Basic, you first need to have the Visual Basic software installed on your computer. Then, open the software and select "New Project" to create a new project. From there, you can use the drag-and-drop interface to add buttons, text boxes, and other elements to your GUI. You can also use the code editor to add functionality to your GUI.

2. Can I use any software to program a PIC18F2550 through USB?

Yes, you can use various software programs to program a PIC18F2550 through USB. Some popular options include MPLAB X IDE, PICkit, and Microchip Studio. It is important to make sure that the software you choose is compatible with the PIC18F2550 and has the necessary programming capabilities.

3. How do I connect the PIC18F2550 to my computer via USB?

To connect the PIC18F2550 to your computer via USB, you will need a USB cable and a USB-to-serial converter. Connect the USB cable to the USB port on the converter and then connect the converter to the PIC18F2550. Plug the USB cable into your computer and make sure the appropriate drivers are installed.

4. Can I program the PIC18F2550 using Visual Basic?

No, Visual Basic is not a programming language that is compatible with the PIC18F2550. You will need to use a programming language that is supported by the PIC18F2550, such as C or assembly language. However, you can use Visual Basic to create a GUI for your PIC18F2550 program.

5. Are there any specific considerations when programming a PIC18F2550 through USB?

Yes, when programming a PIC18F2550 through USB, there are a few things to keep in mind. First, make sure you have the correct drivers installed for the USB-to-serial converter. Additionally, you may need to configure the USB settings in your programming software. Finally, be aware of any potential power issues when using USB as a power source for your PIC18F2550.

Similar threads

  • Programming and Computer Science
Replies
3
Views
251
  • Electrical Engineering
Replies
5
Views
2K
  • Programming and Computer Science
Replies
4
Views
1K
  • Electrical Engineering
Replies
6
Views
1K
Replies
2
Views
862
  • Electrical Engineering
Replies
6
Views
8K
  • Programming and Computer Science
Replies
3
Views
1K
  • Programming and Computer Science
Replies
2
Views
3K
  • Programming and Computer Science
Replies
1
Views
1K
  • Programming and Computer Science
Replies
3
Views
3K
Back
Top