Results 1 to 12 of 12

Thread: Graphical User Interface(GUI) with Visual Basic 2010

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2013
    Posts
    5

    Graphical User Interface(GUI) with Visual Basic 2010

    dear pals,


    I recently installed VB 2010, and have just learnt how to do basic numeric calculation and displays.

    I actually need to make a GUI that will display a graph of data/signal acquired from a PIC connected to my PC via FTTDI/USB.

    I need to send data to the PIC, and equally receive data from the PIC

    Please help/guide me.


    Kind Regards,

  2. #2
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: Graphical User Interface(GUI) with Visual Basic 2010

    Hi bobble and welcome to the VBForums.

    I'm afraid that your question is a bit wage (to say the least) for anyone to give you any advice or answer. First of all, I assume that you by PIC actually mean some specific peripheral hardware and not the PIC chip. I also assume that you just misspelled FTDI.

    The title of your question gives the impression that you have some design issues that you want to get some help with but then you're talking about how to read or write to this, unnamed, hardware. To communicate with the hardware you need to know the protocol it uses to send and receive information once you have the data you want to display it somehow (these are two different issues).

    There is no way anyone here can know how your hardware device communicate or what kind of data it sends so there is no way we can advise you on what would be the best approach to display this data. You just need to give us more information. We are here to help our fellow VB'ers but we do need to understand the issue you're having before we can give you any advice.

  3. #3
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,104

    Re: Graphical User Interface(GUI) with Visual Basic 2010

    Quite likely, you are communicating via some type of serial device, which may be bluetooth or just a serial cable. For either of those, you would be using the SerialPort object to perform the communication. It still wouldn't be directly with the PIC chip, though, but the actual communication may not matter all that much if it really is serial, as you'd just need to know the protocol and the port number.

    As for the graphical element, doing that directly in GDI would be an exercise in frustration. Fortunately, there are LOTS of packages out there to allow for simple graphing (which is probably what you are looking for as you probably only have a line, or multiple line, graph).
    My usual boring signature: Nothing

  4. #4

    Thread Starter
    New Member
    Join Date
    May 2013
    Posts
    5

    Re: Graphical User Interface(GUI) with Visual Basic 2010

    Thanks Andersson,

    The task i have before me is actually to transmit bio signals over a distance using zigbee technology. i already bought,and configured the zigbee modules. Now i need to make some circuitry that involves basically PIC18F452 and the zigbee modules, and also to program the PIC18F452, which is on going @ the moment. I also need to have a kind of graphical preview/display of the signal on a computer at both transmit and receive ends. it is this display that i refer to as GUI. I am using VB 2010 . The PIC18F452 is to be connected to my PC with a FTDI cable.
    Two issues now; how to communicate with the PIC18F452 via the USB/Serial port so as to send and receive data from it, and also how to make the GUI.

    i think i'm a bit clear ....thanks for your interest

    regards,
    bobble

  5. #5
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: Graphical User Interface(GUI) with Visual Basic 2010

    Well, this is the VBForums so I'm not going to comment about the hardware circuitry itself. However, as I mentioned (and so did Shaggy above) to read the data you need to know the protocol that is used. Reading data from a serial port is a pretty straight forward procedure, it's the interpretation of the data you need to be aware of.

    The GUI part is how you want to present the data, is it a graph that needs to be drawn or just numbers to be displayed in a list box?

    But as I also mentioned above, these are really two different questions and we should concentrate at one at the time. It's either about how to read the data or how to display the data once you have it.

  6. #6

    Thread Starter
    New Member
    Join Date
    May 2013
    Posts
    5

    Re: Graphical User Interface(GUI) with Visual Basic 2010

    Thanks once again.....

    Please i don't really understand what you mean by ''what protocol''..may be you can suggest some existing protocols.

    Also,the data entering the computer is digital.

    For the GUI, the acquired data is to be plotted on a graph

  7. #7
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,104

    Re: Graphical User Interface(GUI) with Visual Basic 2010

    There is no standard for data being passed across serial ports. It is just a series of bytes that can mean pretty nearly anything. If you read those bytes from the serial port, will you know what they mean? That's what the protocol is, in this case. Certain bytes may be used for something akin to punctuation, other bytes would be the data, potentially in various fashions, such as big endian vs little endian (the order of bytes in things like integers). In addition, there may be headers, padding (though that's unlikely), CRC values, and other things added in. You'd have to know what a data packet looks like, or else you'd have to work it out by looking at a bunch of packets. You can probably imagine how hard the latter could be. Fortunately, you probably do know the protocol as far as what bytes to expect. It rather sounds like you might be involved with creating that protocol. That would be ideal.

    It also sounds like you might find that the communication isn't all that hard, but there will be some fairly arcane pieces, so it will be like most puzzles: Only simple after you have solved it. I believe that if you search this forum on SerialPort or Serial Port, and possibly if you search for that along with posts by (but not threads started by, as I don't remember him starting a thread on the subject, though he may have) dbasnett you might find some useful stuff.
    My usual boring signature: Nothing

  8. #8
    Fanatic Member
    Join Date
    Feb 2013
    Posts
    985

    Re: Graphical User Interface(GUI) with Visual Basic 2010

    Hi

    I recently installed VB 2010, and have just learnt how to do basic numeric calculation and displays.
    it sounds like you just started using vb.net, not sure if you have used any other languages, but diving into what your talking about is likely to become a headache very quickly.

    you should at least spend some time learning a few concepts and theories behind whats involved before you dive into coding.
    take it a step at a time,

    like they mentioned above concentrate on 1 problem first, but id take it a step back again and say concentrate on the basics first, if it was me id split this into several projects for learning it then go ahead with putting it all together.

    maybe like this, not in any particular order
    -graphical representation trying different methods
    -communicating via serial port/usb just basic stuff, maybe practice on a mouse or some basic device
    -learn about data packets(just the basics) and the different 'layers' in computer communications
    -protocols (i just looked up zigbee modules) its using IEEE 802 standard, and you will need to know about the data you plan to send through, so you will need to check whatever program/hardware the data is coming from
    Yes!!!
    Working from home is so much better than working in an office...
    Nothing can beat the combined stress of getting your work done on time whilst
    1. one toddler keeps pressing your AVR's power button
    2. one baby keeps crying for milk
    3. one child keeps running in and out of the house screaming and shouting
    4. one wife keeps nagging you to stop playing on the pc and do some real work.. house chores
    5. working at 1 O'clock in the morning because nobody is awake at that time
    6. being grossly underpaid for all your hard work


  9. #9

    Thread Starter
    New Member
    Join Date
    May 2013
    Posts
    5

    Re: Graphical User Interface(GUI) with Visual Basic 2010

    Thanks all..it seems i have a very huge job ahead..any other guidance/help would do...

    Regards,

  10. #10
    Lively Member
    Join Date
    May 2011
    Posts
    97

    Re: Graphical User Interface(GUI) with Visual Basic 2010

    hello check this may be found useful http://www.ftdichip.com/Support/Soft...xamples/VB.htm

  11. #11
    Addicted Member
    Join Date
    Nov 2011
    Posts
    223

    Re: Graphical User Interface(GUI) with Visual Basic 2010

    Hi, if you have a FTDI cable I am thinking it is a USB to TTL serial converter cable that is also possibly the same cable you would use to program the PIC.

    If this is the case then the PC sees the USB cable as a virtual comm port. In Visual Basic you would use the serial port component in the toolbox and configure it to transmit/receive serial data between the PIC and PC.

    Your first job is to write some code for the PIC and verify you can receive data transmitted from the PIC to the PC. Use a terminal program for your tests and make sure you are getting what you expect at the terminal. There is no need to make it complicated, transmitting a simple "Hello World" once a second should be enough to prove your communications.

    Once you are happy with the above you can start work on creating a VB Windows application to replace the terminal app. Do you think you have reached this stage yet?? If you do let us know and we can help you get started with VB.

    Using the PIC allows you to create your own serial protocol which can be as easy as start of transmission - data - end of transmission. I personally would not worry about that too much just now it can come later.

  12. #12

    Thread Starter
    New Member
    Join Date
    May 2013
    Posts
    5

    Re: Graphical User Interface(GUI) with Visual Basic 2010

    hi all,

    please am still stuck here.

    i am now able to access my com port,send and receive data. Now i need to plot a graph of the received data using VB 2010.

    Rgrds

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width