NOOB in need of help


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by aratti View Post
    Dave, let him discover the Toggle instruction.

    Al.
    Okie Doki
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    Jan 2009
    Posts
    14


    Did you find this post helpful? Yes | No

    Default

    The toggle wasn't waht I was looking for. I did try it. When you hold down the button and the toggle was going - on/off/on/off etc.....

    Thanks for all the help. I am sure I will be posting more questions as I move forward.

    Thanks again -
    Keith

  3. #3
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Sec.5.36

    Hi Keith,
    Looks like a classic IF THEN ELSE to me.
    Code:
    TRISB = %00001111    ' 4 upper as outputs 4 lower as inputs
    IF  PortB.0 = 1 THEN ' if true then goto next statement
    PortB.4 = 1          ' turn on this port 
    ELSE                 ' goes to here if false
    PortB.4 = 0          ' Turns this port off
    ENDIF                ' ends the if then test for true / false and allows code to continue
    make sure to use resistors pulling down if you close switches to activate or pulling up if you open switches to activate.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Not sure at all but...
    Code:
            TRISB=%00001111
            PORTB=0
    
    Loop:
            PORTB=(PORTB<<4)
            PAUSE 200
            GOTO Loop
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. LCD_AnyPin.pbp
    By Darrel Taylor in forum PBP Extensions
    Replies: 112
    Last Post: - 23rd September 2024, 18:06
  2. Replies: 2
    Last Post: - 7th March 2008, 02:16
  3. Help a noob out?
    By yasiryassin in forum mel PIC BASIC
    Replies: 2
    Last Post: - 15th January 2008, 06:37
  4. Crystals & Caps - Super noob question??
    By kevj in forum General
    Replies: 4
    Last Post: - 24th September 2007, 17:11
  5. Uber noob needs clarity!
    By bill12780 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 23rd July 2007, 21:40

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts