Confused with the PIC Microcontroller

Discussion in 'Embedded Systems and Microcontrollers' started by chichara, Mar 6, 2014.

  1. chichara

    Thread Starter New Member

    Apr 15, 2013
    18
    0
    Hi guys,

    I need your advice about my project.
    I have a project to make some counter that counting object with using photoelectric as sensor and PIC as microcontroller, then each PIC can communicating with one PIC as a master. Communication is using I2C.
    What PIC series i should use?

    I have PIC16F877A, but i'm not sure this series can support my project.
    I have tried using 16F877A, using mikrobasic as a compiler, but for I2C the compiler said Not Enough ROM main. I really confusing about it.

    Now i try to change my PIC into PIC32, is it good choice?
    What series PIC32 that compatible with my project?

    Please help yaa...

    Thank u so much :)
     
  2. ericgibbs

    Senior Member

    Jan 29, 2010
    2,499
    380
    hi,
    Using the external clock for Timer2 on the 16F877A will enable you to count pulses from the sensor, assuming that the sensor output is 0/+5V.?

    The 8K of program memory of the 877A should be more than enough to implement I2C communication.

    E
     
  3. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    Could it be that you are using the compiler in free mode? I have not used that compiler my self. But from the back of head. I think that compiler limit the code size then used as non paid version.
     
  4. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    The PIC16F877A should be overkill for this project, but overkill is fine for development. Once the dust settles you can see how small you can make it.

    Unless you intend to display the results on a color TFT display you don't need a PIC32 either.

    Why use 11 PICs at all? I2C is s short range communication method so your 10 sensor PICs need be close to the mamma PIC anyway, why not just have mamma monitor all 10 inputs? How fast do these objects go whizzing by?
     
  5. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    Why not use a PIC32? There is some barrier to configure it, but it runs fine with just 2 caps (Tantalum). Internal osc., no crystal.

    How do you display 10 counters? On a character LCD?

    Use software I2C, can have longer cables, lower speed.

    OK you use basic, then normally you think in terms of available libraries.

    18F or 24F also are not bad.

    8K is not so much but of course on a 8bit PIC, its 8K program words.

    Maybe the individual sensor PICs could be small 16F chips, all connected to a I2C bus.
     
  6. chichara

    Thread Starter New Member

    Apr 15, 2013
    18
    0
    Hi,

    Thanks for your answer guys.
    So, PIC16F877A is enough for this project right?

    @t06afre I think i have a problem too with the compiler, but i'm not sure if i have a compiler in free mode.

    @ErnieM & takao21203 I don't need TFT color for display on this project, but i'll use (may be) 7" monitor just to display the number of counting.

    "why not just have mamma monitor all 10 inputs?"
    hmm what does it mean ErnieM? is it in one monitor have 10 inputs from PIC? i can't figure it out.

    And.. about I2C, is it have maximum cable length for optimum result?
    I'm scared about it.

    Thanks.
     
  7. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    Instead of a complex multiprocessor arrangement just use 1 PIC to monitor 10 inputs. That is fine as long as the events do not happen too fast. (I can't say if that is true as you have not shared what you are counting).


    The slower you go the longer it can be.
     
  8. chichara

    Thread Starter New Member

    Apr 15, 2013
    18
    0
    Ah, i see.
    So PIC read one by one inputs from sensor right?
    I use this project to count something like box.
    The box size approximately 10cm x 5cm x 2cm.
    So, in one table there are 4 till 5 person sitting down packing and wracking up the small product. And this counter is for counting how many poducts are produced by each person (so it need 4 till 5 photoelectric sensor). So we know how many products produced by one table. And the result of counting displayed in one monitor.
    I don't know if the port of PIC is enough for input from each sensor.

    *sorry for bad in my english. ^^v
     
Loading...