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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
The GPIO.4 pin is multiplexed with the higher priority clkout function. Use the following config line:
Kent
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.