PIC 16F684 Configuration Settings

+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2006

    Question PIC 16F684 Configuration Settings

    Am having trouble getting some pins of the PIC 16F684 to go high using the command "HIGH pin". I noticed the issue when I was writing code that turns particular ports high. I have since used a DIP pic on the breadboard and tested my program on it. By setting pins 5 to 13 to go high, I find that consistently only pins 5, 6, and 11 are working. I have tested this program on 3 Pics and am sure its not a hardware issue.
    Am attaching the program written in PBP looking for some suggestions. Am using ME Programmer Beta software, the code is in PICBasicPro 2.47 and the programmer is ME Labs U2 USB programmer. Please test the program below using the PIC16F684 and if it works for you then advice on the configurations
    you used because am thinking this might be the issue.

    'Port operation configurations
    VRCON=%00000000 'CVref turned off

    ; Program Variables
    Loop VAR BYTE ;general loop counter for LED flashing

    ; Constant definitions
    Outp CON 0
    Inp CON 1

    'Assign Ports to simple name
    LowVoltage VAR PortA.0 'Battery low voltage detection port
    ReedSwitchState var PORTA.1 'Reed Switch ON and OFF state line
    LED VAR PORTA.2 'Turn LED ON and OFF
    HoldTxON VAR PORTC.0 'Hold Tx ON when water contacts activated
    Tx_Data VAR PORTC.1 'Transmit Data Line
    Tx1_Enable VAR PORTC.2 'Transmit 121.5Mhz Line
    Tx2_Enable VAR PORTC.3 'Tranmit 156MHz Line
    MotorControl_1 VAR PORTC.5 'Activate Release Mechanism
    MotorControl_2 VAR PORTC.4 'Activate Latch Mechanism

    'Initialize port states
    TrisA.0=Outp 'set batt low voltage detection to input
    TrisA.1=Outp 'set Reed switch state to input
    TrisA.2=Outp 'set led transmission to output
    TrisC.0=Outp 'set Hold Tx Line ON to output
    TrisC.1=Outp 'set Transmit data line to output
    TrisC.2=Outp 'set Transmit @121.5 to output
    TrisC.3=Outp 'set Transmit @156 to output
    TrisC.4=Outp 'set Motorcontrol_1 to output
    TrisC.5=Outp 'set Motorcontrol_2 to output

    Goto Main
    ;************************************************* *****************************
    LOW HoldTxON ; Initialize by turning clearing all the outputs
    low LED
    low Tx_Data
    Low Tx1_Enable
    low Tx2_Enable
    Low MotorControl_1
    LOW MotorControl_2

    GOTO TurnOnTransmitter
    '************************************************* *****************************


    for loop=0 to 20

    HIGH Holdtxon
    HIGH Tx_Data
    HIGH Tx1_Enable
    HIGH Tx2_Enable
    HIGH MotorControl_1
    HIGH MotorControl_2

    pause 5000
    next loop

    goto turnontransmitter

  2. #2
    skimask's Avatar
    skimask Guest


    Check Section 4 of the Pic16F684 datasheet. Your answer awaits you there.
    Last edited by skimask; - 10th April 2007 at 17:27.

  3. #3
    Join Date
    Dec 2006


    Thanks, The ANSEL register set seemed to have worked for me

Similar Threads

  1. Presetting Configuration Fuses (PIC Defines) into your Program
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 82
    Last Post: - 15th December 2013, 10:54
  2. Changing the Configuration Settings
    By kiwipiper in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 24th October 2007, 08:33
  3. SPI configuration PIC versus Atmel
    By Pedro Santos in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 10th July 2007, 20:17
  4. Replies: 7
    Last Post: - 14th July 2006, 04:21
  5. Serial Pic to Pic using HSER
    By Chadhammer in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 12th March 2005, 00:14

Posting Permissions

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