Setting PortB.7 as output on 16F627/8/48


Results 1 to 9 of 9

Threaded View

  1. #1
    Join Date
    Sep 2008
    Location
    Maine, USA
    Posts
    81

    Default Setting PortB.7 as output on 16F627/8/48

    I'm having trouble getting PortB.1 to work as a digital output on a PIC16F648.
    I have pored over the documentation and tried all the registers - see below.
    What am I missing? I just need to blink an LED with this output and I'm committed to a PCB that locks me into this pin.

    TRISB = %00000000 ' set all as outputs
    CCP1CON = 0 ' turn off capture/compare mode (set all digital I/O)
    CMCON = 7 ' disable comparators
    OPTION_REG = %10000000 ' bit 7 = 1 disables weak pull-ups on portB
    INTCON = 0 ' disable interrupts

    What did I miss?
    Last edited by tekart; - 28th January 2010 at 20:29.

Similar Threads

  1. PICKit2 - warning about configuration words
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 26
    Last Post: - 4th August 2009, 14:01
  2. Help changing CCP3 output pin
    By ChrisHelvey in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 15th July 2008, 02:30
  3. Bit Banging input to output on PIC16F876A
    By Bronurstomp in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 26th June 2008, 19:50
  4. Serious Serial Situation Setbacks...
    By Dansdog in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 7th February 2007, 03:46
  5. HSEROUT Newbie question/problem
    By Mark Scotford in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 11th July 2006, 14:44

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