Why not to prefer avr over pic

Discussion in 'Embedded Systems and Microcontrollers' started by aamirali, Aug 11, 2014.

  1. aamirali

    Thread Starter Member

    Feb 2, 2012
    415
    1
    I have seen pic architecture. It says 8 level stack deep & that it. Some lower end MCU have 2 level stack deep.

    Only one interrupt vector table for all inerrupts in pic16F/12F or other series.


    Then why should someone prefer pic over pic.
     
  2. DerStrom8

    Well-Known Member

    Feb 20, 2011
    2,428
    1,328
    It highly depends on the application. Don't try to start an argument for one over the other, it will always end badly. As Dave Jones of the EEVblog says,

    https://www.youtube.com/watch?v=DBftApUQ8QI
     
    absf and ErnieM like this.
  3. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,397
    497
    Features, price, support.

    Usually any two out of three is good enough. Most people in hobby community find all three because of their smaller and/or more limited needs.
     
  4. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    The lower end MCUs are only interesting for some mass produced circuits. When you do electronics decently you'll spend 100s to 1000s, so if you buy some $2 or $3 controllers, you'll be doing well with them.

    I have changed to PIC32 recently, only use some advanced 8bit PICs, and baseline PICs too- the number of stacks is often unimportant as well you often dont really need interrupts.
     
  5. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    I'm not sure why you would need a stack more than 8 levels deep, the program is getting pretty convoluted if you get that far. From what I've seen there isn't much difference in the range of chips produced by major manufacturers.
     
  6. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    2,692
    2,756
    I prefer chocolate ice cream -- unlike those evil vanilla ice cream eating weirdos.
     
  7. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,397
    497
    I will match your chocolate ice cream and raise you chocolate chunks.
     
  8. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    Maybe you never wrote more complex programs? Some PICs have a memory stack, so you can also pass parameters on the stack.

    8 stacks is not that much actually. and then there's software stack too.
     
  9. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    2,692
    2,756
    Ever try the trinity chocolate from Publix? Mmmmmm....heaven!
     
  10. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    Code ( (Unknown Language)):
    1.  
    2. HAI
    3. CAN HAS STDIO?
    4. I HAS A VAR
    5. IM IN YR LOOP
    6.    UP VAR!!1
    7.    VISIBLE "I can haz choclat"
    8.    IZ VAR BIGGER THAN 10? KTHX
    9. IM OUTTA YR LOOP
    10. KTHXBYE
    11.  
     
    Shagas likes this.
  11. NorthGuy

    Active Member

    Jun 28, 2014
    604
    121
    You're kidding. It makes you fat, destroys your thees, and creates unjust profit for the dentists!!!
     
  12. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    2,692
    2,756
    I don't believe in "unjust profit".
     
  13. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    2,692
    2,756
    That's C, right?
     
  14. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    i can has a uchar
     
  15. NorthGuy

    Active Member

    Jun 28, 2014
    604
    121
    Why not? Their prices are fixed by insurance companies, which provide 90% of the clients. They cannot neither decrease them to attract more customers, nor increase them if the quality of service they provide is better than for the others. Insurance companies fix their prices through re-insurers. Thr re-insurers, in turn, are regulated by the government, which is influenced by the lobbyists hired by dentists, which promote unreasonably high prices. How's that just?
     
  16. nigelwright7557

    Senior Member

    May 10, 2008
    487
    71
    You can get away with small stacks quite easily.
    Instead of :
    CALL A
    CALL B
    RETURN
    You can use:
    CALL A
    GOTO B
     
  17. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    On a baseline PIC this will take about 62 extra cycles each time since reloading the paging bits and the PC is quite complicated.

    Indeed you dont need any real hardware stack it is just much faster if you have it.
     
  18. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    People who run out of stack on little 8-bit microcontrollers should learn more about little 8-bit microcontrollers.

    Reminds me of the way bad drivers "run out of road". ;)
     
    DerStrom8 likes this.
Loading...