Author Topic: I need the code for this in BASIC.  (Read 4906 times)

Offline zbblanton

  • Acid Modder
  • *
  • Posts: 979
  • Post quality +5/-0
  • Gender: Male
    • My modding site
I need the code for this in BASIC.
« 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.

Offline cwn723

  • Granny Spanker
  • *
  • Posts: 430
  • Post quality +0/-0
  • Gender: Male
Re: I need the code for this in BASIC.
« Reply #1 on: March 24, 2008, 02:35:21 PM »
what you mean on?

Offline zbblanton

  • Acid Modder
  • *
  • Posts: 979
  • Post quality +5/-0
  • Gender: Male
    • My modding site
Re: I need the code for this in BASIC.
« Reply #2 on: March 24, 2008, 03:05:12 PM »
nvm mine i found out how to do it

Offline h311jump3r

  • Fart Sniffer
  • *
  • Posts: 41
  • Post quality +0/-0
  • Gender: Male
    • SparkMods - The Mod Repository
Re: I need the code for this in BASIC.
« Reply #3 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

Offline KyleP

  • Ω Allumnist Ω
  • *
  • Posts: 133
  • Post quality +0/-0
Re: I need the code for this in BASIC.
« Reply #4 on: August 12, 2008, 06:17:09 PM »
so we just put in the code u just said or .......

Offline h311jump3r

  • Fart Sniffer
  • *
  • Posts: 41
  • Post quality +0/-0
  • Gender: Male
    • SparkMods - The Mod Repository
Re: I need the code for this in BASIC.
« Reply #5 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.

Offline h311jump3r

  • Fart Sniffer
  • *
  • Posts: 41
  • Post quality +0/-0
  • Gender: Male
    • SparkMods - The Mod Repository
Re: I need the code for this in BASIC.
« Reply #6 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/

Offline h311jump3r

  • Fart Sniffer
  • *
  • Posts: 41
  • Post quality +0/-0
  • Gender: Male
    • SparkMods - The Mod Repository
Re: I need the code for this in BASIC.
« Reply #7 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:


Here is a diagram for a regular 16F84:



Pics with more than 8 have ports...to divide the pins into a managable set.



Proud Member Of :censored:.com

Offline zbblanton

  • Acid Modder
  • *
  • Posts: 979
  • Post quality +5/-0
  • Gender: Male
    • My modding site
Re: I need the code for this in BASIC.
« Reply #8 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.

Offline h311jump3r

  • Fart Sniffer
  • *
  • Posts: 41
  • Post quality +0/-0
  • Gender: Male
    • SparkMods - The Mod Repository
Re: I need the code for this in BASIC.
« Reply #9 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...

Offline zbblanton

  • Acid Modder
  • *
  • Posts: 979
  • Post quality +5/-0
  • Gender: Male
    • My modding site
Re: I need the code for this in BASIC.
« Reply #10 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.

 

SMF spam blocked by CleanTalk
SimplePortal 2.3.5 © 2008-2012, SimplePortal