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.

Which way to go ?

Not open for further replies.


New Member
Hello everyone. Since I am new here and mostly new to PIC I thought I would throw a question out there. Which controller will provide the best outcome for the following project ?.
Hardware: Controller board with 4 sensors interfaced could be optical or inductive. 2 of the sensors will drive the controller to count up to 8 digits ie. 24356834 each (two counters).
2 other sensors will need to be interfaced as switches ie. on/off.
Computer: Serial/USB
A computer application (VB or Delphi) will need to 'read' the value of the counters(2) independently and be able to reset to '0' each of the counters as required. The application will also need to 'read' the value of the switches ie. on or off.

The computer program part of this is more familiar to me than the hardware (PIC) hence the questions.
As far as operability goes, I expect that the computer program will need to interrogate the PIC for the results of it's counters/switches and then do what it has to with the results thereafter.

Your thoughts are appreciated.
I think you might be better with serial (not USB) as it will be easier on the PIC side.

Any PIC with USART (serial module) built in should do the trick. It is up to you whichever PIC you are more comfortable working with. If you are pretty new to PICs then it might be best to choose a larger more versatile PIC like a 16F887 as you will probably want to do other PIC projects eventually so it's better to choose a PIC with more pins and more features and just learn that one PIC. Likewise you might want to choose a development board/programmer that can be used for many projects.

I agree it's probably best for the PC to interrogate the PIC to get the latest count(s). Your serial setup allows for 2way comms anyway and it is safer as the PC will be off doing Windows interrupt tasks etc while the PIC can be keeping the perfect count.

That's a start, it would help more if you could state your preferred programming languages, actual PIC experience, PC experience, hardware design experience etc etc.
Thank you Mr RB,
Firstly I have fairly extensive experience in design/implementation of all sorts of electronic stuff ie. I built my first PC in 1979 completely hand built the boards both computer and video, all on the then S100 bus - what surprised me at the time was it worked. A small new company used to send me sample chips for development purposes, that small company was Intel! wish I had bought shares then... Anyway I digress. I have zero experience with PIC so from that point of view are starting from scratch and some advice from those with experience is certainly appreciated as I progress this application.
I have read most of the 'Getting started stuff' on this site which is a really excellent resource and will source today a Dev kit using that device you have recommended and get started. hey, how hard can it be, only 35 commands...
Cheers and thanks.
Good luck. Might I suggest for your project that you start a thread with a thread title that describes the project, I think you might get more interest and help for your specific project that way since this thread title looks a bit like the overused "which pic is the best for me to start with" titles that everyone gets sick of. :)
Since you are new to pics i suggest you get 2 types of PICs a large and then a smaller. Like to start off get a PIC18F4620.

Doing this will allow you to have a great supply of space and speed. This way when you code you can determine your actual space requirements and determine a smaller size pic and eaily port the code. (if in C)

I dont usually suggest this but i would go straight to C since you have a project that requires a bunch of checking and data transmission its best to be able to follow it thoroughly. C18 from microchip is perfect.

A programmer (PICKIT 2) would be on the list of NEEDs. As well as normal parts like breadboards and led and such.

If you want USB use a usb to serial IC for simplicity. This allows you to use UART code completely and have a Serial connection converted to USB with minimal code change if any.

Ask a lot of questions. I will be glad to help you along the way as im sure many others would be also.

Also i suggest C18 becuase you can declare a variable to be a long and count on it up to "2,147,483,647" which is enough for your large counters.
Thanks gentlemen, Sorry for the late reply but got interrupted by a weekend here.
I will certainly take on board your thoughts. I have PICked up a PICkit 3 and will have a play with that in the meantime and will look toward C18 from Microchip for programming.
Thanks RB for the suggestion re a particular thread related to the project, let me gain a foothold then I will do just that.
Once again many thanks for your assistance and advice.
Not open for further replies.

Latest threads