Menu

12f683 output ????

Help
2011-03-28
2013-05-30
  • Djbillyd007

    Djbillyd007 - 2011-03-28

    I am new to gc basic. I have been using picaxes and ccs c. I have gotten a 12f683 to do everything I think I would need. Serial in/out to PC,Servo, PWM. The only problem I am having is I can't get gpio.4 to shut off. The program below gives me 2.5 volts. If I tell it to go on I get 5v. I'm sure it's in configuration but not sure of syntax I should be using. I tried everything I read in help but am still missing something. Also I am using Graphical basic if that make a difference.

    Code just trying to shut off gpio.4:

    ;Chip Settings
    #chip 12F683,8

    Dir GPIO.0 Out
    Dir GPIO.1 Out
    Dir GPIO.2 Out
    Dir GPIO.3 In
    Dir GPIO.4 Out
    Dir GPIO.5 In
    Do Forever
    Set GPIO.4 Off
    Loop

     
  • Nobody/Anonymous

    The GPIO.4 pin is multiplexed with the higher priority clkout function.  Use the following config line:

    #config OSC=INTRC_OSC_NOCLKOUT
    

    Kent

     
  • Djbillyd007

    Djbillyd007 - 2011-03-29

    Thanks very much, that did it. I was all around it but just kept looking over it. I need to get a little more familure with the data sheets. Good thing is once I fight with something like that I usually remember how i did it.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.