New to 10F220


Closed Thread
Results 1 to 14 of 14

Thread: New to 10F220

Hybrid View

  1. #1
    Join Date
    Aug 2010
    Posts
    25

    Default New to 10F220

    Hi.

    I'm relatively new to PIC's and I have never used the PICF220 before...

    I can't understand how to set the I/Os, TRIS and then?

    And since I'm already asking, how to set the port(s) to be ADC?

    I read in the manual that the internal clock isn't really calibrated, but measured and a correction factor is programmed into the memory.
    How to use it properly? (Without overwriting it when programming the PIC.)

    PS. The PBP doesn't list the PIC10F220, but I guess choosing 222 will work?


    Best regards from a newbie

  2. #2
    Join Date
    Oct 2005
    Location
    New Zealand
    Posts
    171


    Did you find this post helpful? Yes | No

    Default

    I've not had much luck historically using the 10F series, PBP requires too many background resources . Have a look at the 12F series for small projects with PBP

  3. #3
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,651


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mikebike View Post
    Hi.

    I'm relatively new to PIC's and I have never used the PICF220 before...

    Best regards from a newbie
    Hi, Mike

    No hope to run a PBP program with the 10F220 ... too small a RAM size.

    assembler seems the only way with those lilliputian chips ...

    That's why they won't be listed any day ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  4. #4
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429


    Did you find this post helpful? Yes | No

    Default

    Everything you need is in the data sheet.

    You can set the port directions using TRISIO.x=y where x is the GPIO bit number and y is 0 out output or 1 for input. Or use the PBP INPUT or OUTPUT commands, for example:
    OUTPUT GPIO.0
    INPUT GPIO.3

    The ADC is set with ADCON0. Page 30 of the data sheet tells you what to set it to for various configurations.

    Are you using MPASM as your assembler? MPASM has files for the 10f220, so if are using it you would just have to make your own PBP files for it. Use the 10f222 PBP files as a base and change the CODE_SIZE to 100h and the included MPASM file to P10F220.INC

    The internal oscillator is set up in that config file with: _IOFSCS_4MHZ or _IOFSCS_8MHZ

    *edit* 2 above replies beat me - havnt tried PBP on this pic, so they may be right.
    "I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams

  5. #5
    Join Date
    Aug 2010
    Posts
    25


    Did you find this post helpful? Yes | No

    Default

    Oops, not much use learning how to use the 10F220 then....

    Which PIC do you guys recommend then?

    I use PBP and Melabs U2 Programmer.
    I need 2 x ADC, 4 x I/O, internal clock and small size (low price).


    EDIT: Low power is not a drawback.
    Last edited by mikebike; - 15th September 2010 at 11:32.

  6. #6
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429


    Did you find this post helpful? Yes | No

    Default

    The 12F510 would be the cheapest that meets your requirements:

    http://www.microchip.com/wwwproducts...cName=en023670

    *edit*: as long as you dont need a lot of code space. The code space is 4 times that of the 10F220, but still limited.
    Last edited by Kamikaze47; - 15th September 2010 at 11:37.
    "I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams

  7. #7
    Join Date
    Aug 2010
    Posts
    25


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Kamikaze47 View Post
    The 12F510 would be the cheapest that meets your requirements.
    My local supplier don't have the 12F510 in DIP-package, only in SMD.

    The PIC12F629 is slightly more expensive, but in stock in DIP. ??

  8. #8
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,651


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mikebike View Post
    My local supplier don't have the 12F510 in DIP-package, only in SMD.

    The PIC12F629 is slightly more expensive, but in stock in DIP. ??
    The 629 has no ADC !!!

    Choose 12F675 ... or the 12F683 which is not really more expensive, but offers lots of interesting features and ... 2K program space.

    BTW ... could have been an idea to tell us what you intend to do ... don't you think ???

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts