Interfacing microcontroller to PC

Discussion in 'Embedded Systems and Microcontrollers' started by zyu, Nov 26, 2012.

  1. zyu

    Thread Starter New Member

    Nov 26, 2012
    8
    0
    Hi friends,

    I am designing a data acquisition device from 4 sensors. I am thinking of using PIC16F1503 microcontroller from Microchip. I want the microcontroller to have separate pins for sensory data from each sensor. And the microcontroller need to transmit the sensory data to the computer and receive user inputs from the computer.

    What kind of interface between the microcontroller and PC should I use for the above purpose?

    How should the microcontroller be powered? can it be powered from the computer (such as a USB)?

    Thank you
     
  2. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    I use something like this to do exactly that...This can supply power to the uC...
     
    Last edited: Nov 26, 2012
    zyu likes this.
  3. nerdegutta

    Moderator

    Dec 15, 2009
    2,515
    785
  4. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,392
    1,605
    You have manages to find a PIC with no internal method of communication with a PC. Typically you could either make an RS-232 or a USB interface. 232 is less software more hardware, USB is more software less hardware. A USB system may be powered off the USB, where 232 cannot.

    It is possible to do RS-232 without a serial (EUSART) module, better to restrict to slower bit rate.

    And welcome to the forums!
     
    zyu likes this.
  5. MrChips

    Moderator

    Oct 2, 2009
    12,446
    3,362
    There are a number of ways to interface a microcontroller with a PC.

    One of the popular ways is via a USB cable.
     
    zyu likes this.
  6. zyu

    Thread Starter New Member

    Nov 26, 2012
    8
    0
    that helps a lot! I am a green hand in the field. How do I search for the corresponding PCB? I mean do you know any PCB that could fit an MC, multiple sensory input, and multiple output? Thanks
     
  7. zyu

    Thread Starter New Member

    Nov 26, 2012
    8
    0
    Thanks, but it seems Max 232 requires power supply from the chip? Is that correct? I kind want to use computer to power the MC
     
  8. zyu

    Thread Starter New Member

    Nov 26, 2012
    8
    0
    that helps a lot! I am a green hand in the field. How do I search for the corresponding PCB? I mean do you know any PCB that could fit an MC, multiple sensory input, and multiple output? Thanks
     
  9. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,392
    1,605
    Ah, so all you want is a self powered USB development board, something with lots of extra lines to add multiple sensors, and maybe some prototype area to add more circuitry? Anything else, like maybe a bootloader so you don't have to use a programmer you don't (yet) have?

    This should get you started:

    [​IMG]

    Mikroelectronica StartUSB Development Board

    Available at Mouser

    You should be able to get yourself into lots of trouble with this thing. :D

    (Note: There are probably dozens if not hundreds of pretty good to terrible development boards out there. This is just one of them but I'm showing it as it meets many of your needs, even the ones you don't yet know you have. I've used this company before and they make good boards.)
     
  10. John P

    AAC Fanatic!

    Oct 14, 2008
    1,634
    224
    The MAX232 was a terrible idea. That's a level converter for +/-12V RS-232, which computers are using decreasingly often. Those little USB-serial converters are a much better option, and they can give you 5V to run your circuit from. Whether you want a PIC processor with built-in USB has to depend on whether you can learn to program such a chip. Otherwise, the converter board is simpler. Don't forget the software on the computer side, either. That can be fairly tricky.
     
    zyu likes this.
  11. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,392
    1,605
    Or it can be really easy (same as RS-232 serial), and you are free to choose which method you use.

    The PIC side of a USB is very complicated, but most of that gets loaded from libraries you need not study, just know where the top level interface resides. I'd call it a learning bump rather than a curve.
     
Loading...