+ Reply to Thread
Page 2 of 2
First 1 2
Results 16 to 28 of 28

Thread: Atmel vs PIC

  1. #16
    eblc1388 Excellent eblc1388 Excellent eblc1388 Excellent eblc1388 Excellent eblc1388 Excellent
    Join Date
    Jan 2005
    Location
    UK
    Posts
    2,226

    Default

    I have built a HV programmer for AVR but I have never have the need to use it for several years. The programmer is gathering dust.

    Now you are familiar with AVR, why not take sometimes to play around with PIC too? It is also great fun when tools like "programmer+debugger" PICKIT2 is available from Microchip and is not that expensive.

    For UK hobbyists, the PICKIT2 is a bargain if you bought the EPE magazine and get the deal from Microchip Direct. The offer doesn't end till January next year so hurry up.
    L.Chung


  2. #17
    Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent
    Join Date
    Oct 2006
    Location
    Rochester, NY U.S.
    Posts
    9,821
    Blog Entries
    1

    Default

    If you're doing high speed or time critical I/O handling an AVR is 4 times faster than a pic on carefully written code, this is mostly noticed by ASM programmers as you have very tight control over code timing in ASM. AVR's are much friendlier for ASM programmers do to the large register file, and offer speed boost to do significantly decreased paging when using C code compared to a PIC. By large and far I have to agree with Harvey, I spent several months researching PICs/AVRs and other architectures and found AVR the hands down winner for me. I haven't seen an AVR PDF that has it listed and I think the major advantage PICs have is their timers can be clocked asynchronously. I think all AVRs are bound to the sampling of the system clock, so PICs definitly have the hand up in situations like frequency counters.
    "Because I be what I be. I would tell you what you want to know if I
    could, mum, but I be a cat, and no cat anywhere ever gave anyone a
    straight answer, har har."

  3. #18
    Ubergeek63 Excellent Ubergeek63 Excellent Ubergeek63 Excellent Ubergeek63 Excellent Ubergeek63 Excellent Ubergeek63 Excellent
    Join Date
    Apr 2008
    Posts
    1,262

    Default

    Quote Originally Posted by Sceadwian View Post
    I haven't seen an AVR PDF that has it listed and I think the major advantage PICs have is their timers can be clocked asynchronously. I think all AVRs are bound to the sampling of the system clock, so PICs definitly have the hand up in situations like frequency counters.
    Neither is synchronous. They both will run from external clocks and both are synchronized to the internal clock. "So PICs definately have" no hand up and you are left with performance and power characteristics to decide on.

    If someone told you that AVR timers could not respond to external signals they were lying. You are quite right, counters border on useless if they can not respond to the outside world-and the silicon designers know it!
    Last edited by Ubergeek63; 2nd November 2008 at 07:07 PM.

  4. #19
    Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent
    Join Date
    Oct 2006
    Location
    Rochester, NY U.S.
    Posts
    9,821
    Blog Entries
    1

    Default

    Are you sure? Nigel mentioned this a ways back and I checked the PDF for the PIC he was talking about and it specifically stated the timer was asynchronously clockable. I can't remember the model of the pic though. I thought it was neat because the PDF stated the timer was rated for 50mhz even on a much slower part clock so they were good for frequency counters. You could only sample the timer on a system clock boundry but the timer itself ran asynch, perfect for frequency counters.
    "Because I be what I be. I would tell you what you want to know if I
    could, mum, but I be a cat, and no cat anywhere ever gave anyone a
    straight answer, har har."

  5. #20
    Ubergeek63 Excellent Ubergeek63 Excellent Ubergeek63 Excellent Ubergeek63 Excellent Ubergeek63 Excellent Ubergeek63 Excellent
    Join Date
    Apr 2008
    Posts
    1,262

    Default

    Quote Originally Posted by Sceadwian View Post
    Are you sure? Nigel mentioned this a ways back and I checked the PDF for the PIC he was talking about and it specifically stated the timer was asynchronously clockable. I can't remember the model of the pic though. I thought it was neat because the PDF stated the timer was rated for 50mhz even on a much slower part clock so they were good for frequency counters. You could only sample the timer on a system clock boundry but the timer itself ran asynch, perfect for frequency counters.
    You will have to specify next time...it was not so in the ATtiny that I looked at, and now looking at a 16F876 data sheet it is mentioning the "asynchronous mode" but I am not finding the counter spec. I am seeing it a bit picky for reading the counter-you need to stop it before reading it.

  6. #21
    VISN Newbie
    Join Date
    Jan 2008
    Location
    Durban,SOUTH AFRICA
    Posts
    47

    Default

    I have seen frequency counters for PIC's going up to 70Mhz ( 50Mhz according to specifications based on the datasheet).

    For AVR - Elektor article ELEKTOR.com - electronics worldwide - "The microcontroller is clocked at 20 MHz, and so the counter module can be used at frequencies of up to 5 MHz without the need for a prescaler"
    Also 30Mhz Frequency meter / 5 Mhz counter
    I have never seen a AVR counter design reading past it's clocking frequency.
    I am confused about Ubergeek63 's assertation's that "they were lying"

  7. #22
    Super Moderator Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent
    Join Date
    Nov 2003
    Location
    Derbyshire, UK
    Posts
    29,752

    Default

    There was a 50MHz counter in the MicroChip application notes years and years ago, so long ago it used an OTP chip - many years later it was ported to the EEPROM based chips (and LCD replaced the LED display), and for many years was available as a kit (I have one here I bought a long time back).
    PIC programmer software, and PIC Tutorials at:
    http://www.winpicprog.co.uk

  8. #23
    Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent
    Join Date
    Oct 2006
    Location
    Rochester, NY U.S.
    Posts
    9,821
    Blog Entries
    1

    Default

    Uber you seem to be confused. AVR or PIC you can only sample the externally driven timer during a system clock boundary. But on a PIC the timer itself is asynchronous. It's limited only by it's analog bandwidth and the driven signal, which can be WAY past system clock speeds. The AVRs externally driven timer is synchronized to the system clock, Nyquist kicks in real fast, if you try to sample a signal more than 1/4 the system clock of an AVR you're going to get aliasing effects that will mirror harmonic frequencies.
    Either way really if you want a truly high speed frequency counter with PIC or PIC you just use an AVR or a PIC and you pick a good external counter and just use the PIC or AVR to sample it, they're both limited on sampling to system clock ticks anyways, and you can get massively higher frequencies with an external counter.
    Last edited by Sceadwian; 11th November 2008 at 01:58 AM.
    "Because I be what I be. I would tell you what you want to know if I
    could, mum, but I be a cat, and no cat anywhere ever gave anyone a
    straight answer, har har."

  9. #24
    Super Moderator Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent
    Join Date
    Nov 2003
    Location
    Derbyshire, UK
    Posts
    29,752

    Default

    Quote Originally Posted by Sceadwian View Post
    Either way really if you want a truly high speed frequency counter with PIC or PIC you just use an AVR or a PIC and you pick a good external counter and just use the PIC or AVR to sample it, they're both limited on sampling to system clock ticks anyways, and you can get massively higher frequencies with an external counter.
    I'm a little confused what you're on about?, all you need for massive higher frequencies is a prescaler - which you require anyway, for frequencies higher than 50MHz or so (usual TTL upper limit).
    PIC programmer software, and PIC Tutorials at:
    http://www.winpicprog.co.uk

  10. #25
    Ubergeek63 Excellent Ubergeek63 Excellent Ubergeek63 Excellent Ubergeek63 Excellent Ubergeek63 Excellent Ubergeek63 Excellent
    Join Date
    Apr 2008
    Posts
    1,262

    Default

    Quote Originally Posted by Sceadwian View Post
    Uber you seem to be confused. AVR or PIC you can only sample the externally driven timer during a system clock boundary. But on a PIC the timer itself is asynchronous. It's limited only by it's analog bandwidth and the driven signal, which can be WAY past system clock speeds. The AVRs externally driven timer is synchronized to the system clock, Nyquist kicks in real fast, if you try to sample a signal more than 1/4 the system clock of an AVR you're going to get aliasing effects that will mirror harmonic frequencies.
    Either way really if you want a truly high speed frequency counter with PIC or PIC you just use an AVR or a PIC and you pick a good external counter and just use the PIC or AVR to sample it, they're both limited on sampling to system clock ticks anyways, and you can get massively higher frequencies with an external counter.
    My confusion was primarily was the async nature of some of the PIC timers.

    The reason for the counters to be synchronized is to eliminate metastability in the reading of the counter. While you were referring to the sample granularity, without synchronization you could have the reading latch stuck in an undefined state for 10x the rated clock frequency and be at a random value after that.

    This effect would only be seen when the counter was changing at the "instant", between the undefined internal setup and hold times of the chip, the sample was taken.

    The only ways around it would be to gate the HF counter input with a crystal referenced counter and taking the stable reading in between or taking an average of similar readings while throwing out the wild ones.

  11. #26
    Ubergeek63 Excellent Ubergeek63 Excellent Ubergeek63 Excellent Ubergeek63 Excellent Ubergeek63 Excellent Ubergeek63 Excellent
    Join Date
    Apr 2008
    Posts
    1,262

    Default

    Quote Originally Posted by Nigel Goodwin View Post
    I'm a little confused what you're on about?, all you need for massive higher frequencies is a prescaler - which you require anyway, for frequencies higher than 50MHz or so (usual TTL upper limit).
    Who uses those museum pieces anymore? LV uses a fraction of the power and runs 200MHz for around not much more money.

  12. #27
    Super Moderator Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent
    Join Date
    Nov 2003
    Location
    Derbyshire, UK
    Posts
    29,752

    Default

    Quote Originally Posted by Ubergeek63 View Post
    Who uses those museum pieces anymore? LV uses a fraction of the power and runs 200MHz for around not much more money.
    You still need a prescaler to get to 500MHz, so there doesn't seem much advantage? - 500MHz is a commonly desired range to cover both 2m and 70cm.
    PIC programmer software, and PIC Tutorials at:
    http://www.winpicprog.co.uk

  13. #28
    Ubergeek63 Excellent Ubergeek63 Excellent Ubergeek63 Excellent Ubergeek63 Excellent Ubergeek63 Excellent Ubergeek63 Excellent
    Join Date
    Apr 2008
    Posts
    1,262

    Default

    Quote Originally Posted by Nigel Goodwin View Post
    You still need a prescaler to get to 500MHz, so there doesn't seem much advantage? - 500MHz is a commonly desired range to cover both 2m and 70cm.
    that depends on if you are trying to run on a battery or not.

+ Reply to Thread
Page 2 of 2
First 1 2

Tags for this Thread