LED ON and OFF with 2 Push button switches


Results 1 to 16 of 16

Threaded View

  1. #3
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: LED ON and OFF with 2 Push button switches

    LED CON 0 doesn't clearly map the LED to a pin.

    LED VAR GPIO.0 does. Just easier to understand.


    I like to put a pinout connection diagram for the chip as a reminder what is connected to what. It also helps when asking a question.
    Similar to this example

    Code:
    ;
    ; Target Controller -      PIC16F628A 
    ;                                  __________  
    ;                       d6--RA2 |1       18| RA1--d5
    ;                       d7--RA3 |2       17| RA0--d4
    ;              LED-------RA4 |3       16| OSC1--------
    ;     +5V-----------!MCLR |4       15| OSC2--------
    ;     Ground----------Vss |5       14| VDD---------+5 V
    ;              gps in-----RB0 |6       13| RB7--------- 
    ;                         ---RB1 |7       12| RB6--------- 
    ;                         ---RB2 |8       11| RB5--e
    ;                   pbutt--RB3 |9       10| RB4--rs
    ;                                     ----------
    Last edited by tasmod; - 28th April 2014 at 13:33.
    Rob.

    The moment after you press "Post" is the moment you actually see the typso

Similar Threads

  1. Push button on PIC16F887
    By menta in forum General
    Replies: 21
    Last Post: - 25th June 2008, 07:47
  2. 12f629 push button & LED
    By yankee in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 10th February 2006, 01:45
  3. Button Push within 3 second Window
    By Tissy in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 22nd December 2005, 10:06
  4. push button problem
    By ngeronikolos in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 2nd June 2005, 19:44
  5. Push Button 'Menu' to Choose Variable.
    By Tissy in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 10th March 2005, 07:00

Members who have read this thread : 1

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