completely incompetent


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2006
    Posts
    76

    Default completely incompetent

    so for a while I was sitting here trying to get my lcd to read out properly. no luck in that. so now I have moved on to reading buttons, and I cant even get that to work. There must be some fundamental PBP thing that I am just not getting. here is my code. the button is wired to make the pin go high when pressed. I have a 4.7k resistor on the pin side.




    B0 Var Byte

    B0 = 0 ' Zero Button working buffer
    pause 10

    loop:
    BUTTON porta.1,1,255,0,B0,0,notp ' Check button
    pause 10
    high portc.4
    goto loop

    notp:
    low portc.4
    pause 10
    Goto loop ' Do it forever

  2. #2
    Join Date
    Dec 2003
    Location
    Wichita KS
    Posts
    511


    Did you find this post helpful? Yes | No

    Default

    Your Pause 10 is only for 10 milliseconds!


    Try something a little longer....like Pause 1000 for 1 second.



    Dwayne
    Ability to Fly:
    Hurling yourself towards the ground, and missing.

    Engineers that Contribute to flying:
    Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute

    Pilots that are Flying:
    Those who know their limitations, and respect the green side of the grass...

  3. #3
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    What PIC are you using?

    If PortA is analog you'll need to disable A/D on RA1 to use it for digital input.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

Similar Threads

  1. PBP projects for R/C models
    By malc-c in forum Code Examples
    Replies: 771
    Last Post: - 21st October 2016, 12:56
  2. EasyHID and USB for Newbies??
    By Squibcakes in forum USB
    Replies: 68
    Last Post: - 26th November 2015, 22:41
  3. Now to something completely different
    By Ted's in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 25th June 2008, 17:51

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