Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Advice Please: Want to Learn Interfacing Computers and Circuits

Status
Not open for further replies.

thegracken

New Member
Hello Everyone!

First, I would like to give a real brief background, and let you know my purpose for this post. I am a physics student who has taken one introductory analog circuit design course that covered a bit of digital circuitry. I also have a great deal of experience with programming in C.

My purpose for posting here is that I want to learn how to interface circuits and computers. In particular: I want to be able create a SIMPLE (as simple as possible, because I want to understand every component... without being trivial of course) circuit connected to my computer via USB. I then want to write a linux driver that interacts with the circuit in some simple way.

What I need to know is, what hardware/circuitry should I purchase to make this happen?

Thanks much for any help!
 
Well, if you want USB connectivity, that means you'll need a USB port at the project end of the cable, so you might be best served going the microprocessor route (PIC, etc.), since these are easily interfaced with USB (I believe some PICs come with built-in USB ports).

This has advantages and disadvantages. On the plus side, it solves the problem of USB connectivity, and gives you a very flexible platform for experimentation.

The downside is that in addition to learning digital circuit interfacing, now you also have to learn to program the damn thing (PIC or whatever). It seems you may already have the programming skills needed, but you'll have to learn to apply them to a particular new platform.

If you go the PIC route, you can connect all sorts of digital devices to the PICs ports, and sense or set them remotely via USB.

If you didn't choose to use a microprocessor, I suppose the ultimate learning experience would be building your own USB port out of discrete parts (gates, etc.). Don't know how to do this myself, but I believe it is do-able, and it would teach you a lot about both hardware and software interfacing. Plus you could then use it to connect your other projects via USB.
 
Last edited:
if you want to make do with basic knowledge of electronics and embedded systems programming, then look into the popular Arduino project (http://www.arduino.cc/). Basic skills are required here, USB connectivity is ready made for you. You only need to add the relevant hardware to make your application, like a few LEDs, some push buttons etc. The IDE for development is free to download and use. The programming language is like C/C++ and should not be difficult to learn. The developed code is loaded into the board via the USB port.

The NXP mbed project alos looks good, visit this link for more info (**broken link removed**). Here again USB connectivity is ready made. You only need to concentrate on the application. The Mbed compiler is used to program the device, the programming language is similar to C and the IDE looks friendly. Here again code is programmed via the USB port.

On the other hand if you want to start from scratch, then visit the Microchip site (http://www.microchip.com/), select an appropriate micro-controller, I think the PIC18F4550 should be good, it has plenty of I/Os for you to play with. The PIC18F2550 is the lower pin count version, this may also suit your purpose. The MPLAB IDE and the MPASM toolsuite can be downloaded from site, these are free.

If you want to use a C compiler then you can check out the student version of the Microchip C compiler. They also have some interesting development boards. Click on the USB link in their main page for more information. There is a wealth of info there, from datasheets to application notes, third party tools etc.

If you find Microchip C compiler expensive then check out the CCS C Compiler (PCH), I use it all the time. Visit http://www.ccsinfo.com for more information on this. They also have development tools and demo boards.

In both the above projects (arduino and mbed) the programming (loading of developed code into the device/board) was done by the board, you didn't need a separate programmer. But to program the PIC you have to buy a separate programmer or a debugger (for diagnostics).

To sum up you need these items to start programming the Microchip PIC micro-controller

1. MPLAB IDE, MPASM assembler free to download and use.
2. Programmer for programming PIC micro-controller, must be bought from Microchip or third party companies, or can be made. Not required for a development board .
3. In-Circuit debugger, if advanced debugging is required. Also may not be needed for a development board.
4. Extra hardware for USB connectivity is required. Not needed for a USB based development board.

You should also get hold of a good book that describes USB interfacing for embedded systems. This is a good book on USB interfacing..**broken link removed**

I hope this was helpful to you..
 
Last edited:
Status
Not open for further replies.

Latest threads

Back
Top