newbie question


Closed Thread
Results 1 to 11 of 11

Thread: newbie question

Hybrid View

  1. #1
    Join Date
    Mar 2008
    Posts
    7

    Default newbie question

    hi,
    i am new with microcode studio.my problem is i need to connect switches to pic16f877 to "on" the pic so that i can send my data to the lcd.but how to "off" the pic to stop sending data by writing coding in pic?i need the command that can stop the pic from continue sending data when the switch is opened.thankz.
    Last edited by daphne8888; - 21st March 2008 at 18:20.

  2. #2
    Join Date
    Mar 2008
    Location
    Texas, USA
    Posts
    114


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by daphne8888 View Post
    hi,
    i am new with microcode studio.my problem is i need to connect switches to pic16f877 to "on" the pic so that i can send my data to the lcd.but how to "off" the pic to stop sending data by writing coding in pic?i need the command that can stop the pic from continue sending data when the switch is opened.thankz.
    Hu? Try again. Makes no sense.

  3. #3
    Join Date
    Mar 2008
    Posts
    7


    Did you find this post helpful? Yes | No

    Unhappy

    i mean that i connect a port to a push button where is the other end is connected to a pull up resistor with 5V. when i push the button, it will on. but after i release, it should b off but why my pic on the port still is 'high' ? got what coding that can change the input that "high" to "low"?
    Attached Images Attached Images   

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by daphne8888 View Post
    i mean that i connect a port to a push button where is the other end is connected to a pull up resistor with 5V. when i push the button, it will on. but after i release, it should b off but why my pic on the port still is 'high' ? got what coding that can change the input that "high" to "low"?
    Still doesn't make much sense....losing something in the translation....
    But if I'm getting what you're saying, the 'high' to 'low' command is right in the PBP manual.

  5. #5
    Join Date
    Mar 2008
    Location
    Texas, USA
    Posts
    114


    Did you find this post helpful? Yes | No

    Default

    The diagram says a lot.

    The end of the switches that is connected to the resistors should go to ground and the resistors should go to the pin ports.

    Code:
    PIN<--------->SWITCH<---------->GROUND
         ^
         |
         |
         |
         L----------->RESISTOR<-------->Vdd(power)
    Port (pin) Logic is HIGH with switch idle, LOW when switch is pushed. This is for the first picture, when (unlike what you said) the resistors are tied to ground, In the second picture I can't see where they are tied.

    Anyway I NOW understand what you are saying. What's going on is you push the button for a high, the port goes high, but when you release the switch, the port still reads high. That's called a "FLOATING INPUT" and a poor design. Use the logic I show above. It's a good way to keep the pins from floating (not high, not low, but read as high).
    Last edited by JD123; - 21st March 2008 at 21:16.

  6. #6
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by JD123 View Post
    The diagram says a lot........It's a good way to keep the pins from floating (not high, not low, but read as high).
    Now the translation makes sense....somewhat....

Similar Threads

  1. Newbie 74hc595 question
    By manjero in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 22nd January 2008, 22:22
  2. newbie with serial com question...
    By kevlar129bp in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 16th December 2006, 05:34
  3. Newbie Question - Info Please
    By ehoskins in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 2nd October 2006, 14:50
  4. Greetings from Newbie and a question
    By ChrisHelvey in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 24th July 2006, 15:52
  5. Newbie question
    By senojlr in forum General
    Replies: 7
    Last Post: - 11th April 2006, 21:23

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