Acidmods
AcidMods Resources ----- ( These are helpful tools for modding ) => Pic Programmers and Programs => Topic started by: zbblanton on March 19, 2008, 08:53:49 AM
-
ok i need to no a simple code. say i want to set pin1 on porta or b to ON what would be the code for that.
-
what you mean on?
-
nvm mine i found out how to do it
-
and how did u do it? 120 days later someone else doesn't know now...and u didn't say how you fixed ur problem. Grrr
-
so we just put in the code u just said or .......
-
so we just put in the code u just said or .......
No, that code is not for the 12F683. Everyone on this forum uses the 12F683 including kingmike. To make the pin 1 (which is the 3rd I believe excluding the power and ground pins) high you need to put GPIO.0 = 1 for High
0 for low
hmmm...I got some code that I can give you if you need it...and a way to get picbasic pro free. The code hasnt been tested but it passes the compiler with no errors. Tell what you think...or pm me.
-
OH! I just made a pic programming category and added some tutorials and guides to it:
check it out: http://www.:censored:.com/tuts/view_tutorials/PIC_Programming/12F683/ (http://www.:censored:.com/tuts/view_tutorials/PIC_Programming/12F683/)
-
you can use the same code for different pics, you need to compile it for the right pic..
Thats wrong... the.0 defines the pin, then 1 would make it an output/high..
and GPIO is a general purpose in put output pin, but you need to speicfiy with port
you would have to use PORTB or PORTA
thanks
PORTB.1 HIGH is right
hope this helps, and i may be wrong :Z
No, that is only for chips that have more than 8 pins. If it has 8 or less pins GPIO.0, GPIO.1, GPIO.2, GPIO.3, GPIO.4, GPIO.5, are all the input/output pins that it can have. u can't use port a/b on a pic chip that has 8 or less pins.
Here is a diagram for a regular 12F683:
(https://acidmods.com/forum/proxy.php?request=http%3A%2F%2Fdbodnar.com%2FPICs%2Fimages%2Fpins_12f683.JPG&hash=69ad511ba37e2014d638062d11d6bc28c9c40656)
Here is a diagram for a regular 16F84:
(https://acidmods.com/forum/proxy.php?request=http%3A%2F%2Fwww.ke4nyv.com%2F16f84diagram.jpg&hash=6a730191b68d9c829550b62344f5b1aab7a19b0f)
Pics with more than 8 have ports...to divide the pins into a managable set.
Proud Member Of :censored:.com (http://:censored:.com/forum/")
-
Wow i geuss i did forget to post the i got but yea it what everyone posted up there
portA.1 = high
gpio.2 = high
yea i geuss that was my bad.
-
Okay, wow thanks alot! I didn't actually realise that.
please stop advertising your side it is irritating now
GRRRRR...
-
Yea my questions been answered here, so this topic is :locked: don't want a fight to break out.