16f630 help please


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2005
    Location
    down south
    Posts
    90

    Default 16f630 help please

    I've been using the 12f629 on few home hobby projects and now I need more I/O and I found that the 16f630 is about the same as the 629 but with more I/O and should fill the need. what little programing I do I use PBP-CDlite
    this is how I was shown to config. the I/O , set to digital and turn weak pull ups on. But Iam not sure how to do it with the 16f630. Any help?. Looking at the data sheet I can read that RC0-RC5 do not have weak pulls.
    If some one would show me how to read the data sheet to config the I/O and pullups I would be very thankful

    @ DEVICE pic12F629

    TRISIO = %00001100 ' make gpio 2 / 3 inputs

    ' FOR REFERENCE ONLY
    '00111111 = ALL PINS INPUTS

    '00100000= GPIO.5 PIN 2 IS A INPUT
    '00010000= GPIO.4 PIN 3 IS A INPUT
    '00001000= GPIO.3 PIN 4 IS A INPUT
    '00000100= GPIO.2 PIN 5 IS A INPUT
    '00000010= GPIO.1 PIN 6 IS A INPUT
    '00000001= GPIO.0 PIN 7 IS A INPUT



    OPTION_REG.7 = 0 ' gpio 0 - 2 digital
    WPU = 255 ' week pull ups on all pins
    CMCON = 7 ' turn weak pull ups on

    SYMBOL RED = GPIO.0 'PIN 7
    SYMBOL GREEEN = GPIO.1 'PIN 6
    SYMBOL PB = GPIO.2 'PIN 5
    SYMBOL BLUE = GPIO.4 'PIN 3
    SYMBOL ORANGE = GPIO.5 'PIN 2

  2. #2
    Join Date
    Aug 2005
    Location
    down south
    Posts
    90


    Did you find this post helpful? Yes | No

    Default

    OK I think I've got the I/O config

    TRISA =
    00111111= ALL PINS INPUTS
    00100000 =PORTA.5 /PIN 2 IS A INPUT
    00010000=PORTA.4/PIN 3 IS A INPUT
    00001000=PORTA.3/PIN 4 IS A INPUT (can only be input)
    00000100=PORTA.2/PIN 11 IS A INPUT
    00000010=PORTA.1/PIN 12 IS A INPUT
    00000001=PORTA.0/PIN 13 IS A INPUT
    TRISC =
    00100000=PORTC.5 /PIN 5 IS A INPUT
    00010000=PORTC.4/PIN 6 IS A INPUT
    00001000=PORTC.3/PIN 7 IS A INPUT
    00000100=PORTC.2/PIN 8 IS A INPUT
    00000010=PORTC.1/PIN 9 IS A INPUT
    00000001=PORTC.0/PIN 10 IS A INPUT

    but still not sure on the turning on weak pull ups
    any help
    Last edited by grounded; - 26th August 2005 at 02:30.

  3. #3
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Weak Pull-Up's are only avaialble on PortA on this PIC with the exception of RA3 which does not have one.

    There are TWO STEPS to enabling the Weak Pull-Up's on this PIC...

    Step 1. You must first enable the Weak Pull-Ups by CLEARING the RAPU bit in the OPTION Register (see Datasheet section 2.2)... ie...

    OPTION_REG.7=0

    Step 2. Then you have to INDIVIDUALLY SET the bits for each pin you require them on in the WPUA Register (Datasheet 3.3). For example if you wish weak pull ups on RA0, RA1 and RA4, then you would set...

    WPUA=%00010011

  4. #4
    Join Date
    Aug 2005
    Location
    down south
    Posts
    90


    Did you find this post helpful? Yes | No

    Default

    thank you
    just trying to learn

Similar Threads

  1. 16F630 OSCCAL value warning - PICKit2
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 3rd September 2007, 19:12
  2. Help Me!!! pic16f628 to 16f630
    By tohu thomson in forum mel PIC BASIC
    Replies: 1
    Last Post: - 20th August 2007, 14:16
  3. 16f630 and LCD
    By trying in forum General
    Replies: 4
    Last Post: - 11th May 2006, 15:24
  4. 16F630 and MCP3221 I2C
    By badcock in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 22nd August 2005, 07:16
  5. Problem with 2x16 LCD on 16F630
    By Falcon in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 10th June 2005, 03:25

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