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

Title: I need the code for this in BASIC.
Post 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.
Title: Re: I need the code for this in BASIC.
Post by: cwn723 on March 24, 2008, 02:35:21 PM
what you mean on?
Title: Re: I need the code for this in BASIC.
Post by: zbblanton on March 24, 2008, 03:05:12 PM
nvm mine i found out how to do it
Title: Re: I need the code for this in BASIC.
Post by: h311jump3r on August 09, 2008, 11:57:46 PM
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
Title: Re: I need the code for this in BASIC.
Post by: KyleP on August 12, 2008, 06:17:09 PM
so we just put in the code u just said or .......
Title: Re: I need the code for this in BASIC.
Post by: h311jump3r on August 12, 2008, 08:18:45 PM
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.
Title: Re: I need the code for this in BASIC.
Post by: h311jump3r on August 12, 2008, 08:40:43 PM
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/)
Title: Re: I need the code for this in BASIC.
Post by: h311jump3r on August 13, 2008, 06:00:40 PM
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/")
Title: Re: I need the code for this in BASIC.
Post by: zbblanton on August 15, 2008, 12:53:27 PM
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.
Title: Re: I need the code for this in BASIC.
Post by: h311jump3r on August 15, 2008, 07:47:48 PM
Okay, wow thanks alot! I didn't actually realise that.

please stop advertising your side it is irritating now

GRRRRR...
Title: Re: I need the code for this in BASIC.
Post by: zbblanton on August 16, 2008, 12:27:15 AM
Yea my questions been answered here, so this topic is :locked: don't want a fight to break out.
SimplePortal 2.3.5 © 2008-2012, SimplePortal