Connect with us

PIC questions

Discussion in 'Electronic Basics' started by dave.harper, Feb 2, 2005.

Scroll to continue with content
  1. dave.harper

    dave.harper Guest

    I'm switching over to PICs from Basic Stamps due speed, capacity, and
    price reasons. I've already purchased a semi-universal programmer, and
    am looking a couple good PICs to start with. I was thinking about a
    lower end PIC for simple projects, and a mid-range PIC for more
    advanced stuff. I has thinking about the 12F629 for the low-end stuff,
    and the 16F88 for mid-range stuff. Would these be good PICs to start
    with?

    Also, apparently these come with their own internal oscillators. Am I
    correct in understanding that these will not need crystals unless I
    want to clock them at different speeds? Do external oscillators add
    any benefit for these PICs? Speed? etc?
    Thanks in advance for any insight...

    Dave
     
  2. I've never used a 12F myself, but that's just because I didn't have any.
    They should be fine for small projects where you only want a few i/o
    pins. Since I've never used one personally, the rest of my response
    will be on the 16F88.

    For the 16F's, I started on the F84 (a few moons ago ;-) and then
    switched to the 16F628. Now, I'm tinkering with a 16F88. I like it,
    but it's a bit sensitive to PS noise. Be sure to use bypass caps on the
    cpu or you will likely see mysterious device resets. This is the first
    PIC I've used that has a real ADC in it (the F628 just has comparators).
    I just used the ADC for the first time yesterday, worked like a champ
    first time out. ;-) The 16F88 is also a member of the nanowatt PIC
    family and really uses a miniscule amount of power.

    Note: I just noticed a warning in the datasheet saying to use a pull-up
    resistor >1k on the MCLR line instead of tying it directly to Vdd or
    latch-up may occur due to spikes. Hmm....I guess I better change my
    methods. I've always just tied it high on the other PICs with no ill
    effects.
    Yes, the 88 has a multiple speed internal oscillator that runs from
    31KHz to 8MHz. It's reasonably accurate for most projects (+/- 1%
    typical at 25C). I wouldn't depend on it in production if rs-232 comms
    are going to be used, especially over any realistic temperature range.
    I would recommend you use crystals if you need clock time accuracy or
    even with serial comms. If you can live with a little bit of
    inaccuracy, the internal oscillator is fine.
    You can crank the F88 up to 20MHz if you use a crystal.
    The 18F452 might be interesting to you. It will run at up to 40MHz
    using a 10MHz crystal giving you a 100nS instruction cycle time. It
    also has certain advantages over the 16F's in terms of the instruction
    set and the architecture.
     
  3. Look at: http://www.voti.nl/e_index.html
    for a lot of PICinfo.

    petrus bitbyter
     
  4. Bill Bowden

    Bill Bowden Guest

    There is a lot of low cost PIC stuff at www.glitchbuster.com
    12F629 ----- $1.24
    16F88 $3.19
    16F628 $2.67

    -Bill
     
  5. Bill Bowden

    Bill Bowden Guest

    You can find a lot of low cost PIC stuff at www.glitchbuster.com

    12F129 is about $1.24
    16F88 ------- $3.19
    16F628 ------- $2.67

    -Bill
     
  6. Jamie

    Jamie Guest

    most of the pics have the internal osc, you only need to supply Xstal or
    Cap (depending in which one) to get the internal clock to operate.
    after you have master the pic, there are also things like the ATMEL
    chips (AVR), they use linear addressing.
     
  7. Active8

    Active8 Guest

    And he (Randy) ships fast.
     
  8. Mark Jones

    Mark Jones Guest


    And if you're looking for an upgrade from PICBasic, check out
    http://groups.yahoo.com/group/jallist/ and binaries from
    http://sourceforge.net/projects/jal/ - new release Jan 28.
     
  9. Byron A Jeff

    Byron A Jeff Guest

    <I'm switching over to PICs from Basic Stamps due speed, capacity, and
    <price reasons. I've already purchased a semi-universal programmer, and
    <am looking a couple good PICs to start with. I was thinking about a
    <lower end PIC for simple projects, and a mid-range PIC for more
    <advanced stuff. I has thinking about the 12F629 for the low-end stuff,
    <and the 16F88 for mid-range stuff. Would these be good PICs to start
    <with?

    Yes for the 16F88. It come fully packed with peripherals and memory.
    For the 8 pin package maybe the 16F683 may be a better choice. It's also
    nanowatt (with the internal oscillator), and has 2K of code space.

    <
    <Also, apparently these come with their own internal oscillators. Am I
    <correct in understanding that these will not need crystals unless I
    <want to clock them at different speeds?

    To a point. As nanowatt parts, they have an internal 8 Mhz oscillator
    coupled with a on the fly frequency divider that goes down to 31250 Hz.

    < Do external oscillators add
    <any benefit for these PICs? Speed? etc?

    You'll need crystals or resonators for 2 types of situations:

    1) You need better performance than the 8Mhz can give you. Both parts run up
    to 20 Mhz with an external oscillator.

    2) You need tighter frequency tolerances for the USART for example.

    Hope this helps,

    BAJ
     
  10. dave.harper

    dave.harper Guest

    Thanks Jeff. As a follow-up, will the internal oscillator be good
    enough for serial communication up to, say, 9600 bps? Under what
    circumstances would I need tighter tolerances for the USART?

    Thanks again,
    Dave
     
  11. Byron A Jeff

    Byron A Jeff Guest

    <
    <Byron A Jeff wrote:
    <
    <> You'll need crystals or resonators for 2 types of situations:
    <>
    <> 1) You need better performance than the 8Mhz can give you. Both parts
    <run up
    <> to 20 Mhz with an external oscillator.
    <>
    <> 2) You need tighter frequency tolerances for the USART for example.
    <
    <Thanks Jeff.

    No problem.

    < As a follow-up, will the internal oscillator be good
    <enough for serial communication up to, say, 9600 bps?

    No promises. It can fluctuate as much as 10% IIRC. Which means that it may
    not work.


    < Under what
    <circumstances would I need tighter tolerances for the USART?

    You have a 5% overall error budget between both ends. Anything outside of that
    will cause errors.

    BAJ
     
  12. Bill Bowden

    Bill Bowden Guest

    Under what circumstances would I need tighter tolerances for the
    USART?

    I've used the 16f628 serial I/O at 19,200 with the internal 4 mHZ
    oscillator without errors. If the oscillator changes frequency
    by 1 part in 18, you lose the last data bit. 1 part in 16 loses
    bits 6 and 7, etc. But the internal oscillator seems to be
    pretty good at 1% or better. I think I put the circuit in the
    freezer, and then under a heat gun, and it survived both tests.

    -Bill
     
  13. I'm switching over to PICs from Basic Stamps due speed, capacity, and
    That depends on what you need. The 12F629 is a bit short on I/O pins,
    but of course very cheap. The 16F88 is the king of the 18-pins 14-bit
    core chips, but you might want more pins (maybe an 16F877A) and/or
    more CPU power (18Fxxx). Personally I think the 16F630/676 are very
    good value for money. There is so much to choose from. Just stay clear
    of the 16x84(a) unless you are building an existing project and don't
    want to modify the code.

    The internal oscillator means the you need fewer components and (for
    some chips) can change speed on the fly. Be aware that the internal
    oscillator is not very accurate.




    Wouter van Ooijen

    -- ------------------------------------
    http://www.voti.nl
    Webshop for PICs and other electronics
    http://www.voti.nl/hvu
    Teacher electronics and informatics
     
  14. Thanks Jeff. As a follow-up, will the internal oscillator be good
    Yes for on-the-bench work at 20 degrees Celcius and a 5.0 Volt supply
    and an 'other side' that has an accurate clock.

    No for serious production.


    Wouter van Ooijen

    -- ------------------------------------
    http://www.voti.nl
    Webshop for PICs and other electronics
    http://www.voti.nl/hvu
    Teacher electronics and informatics
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-