Problem with peek in portB


Results 1 to 2 of 2

Threaded View

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


    Did you find this post helpful? Yes | No

    Default

    It's not revelant to your problem but ss you probably have PBP, you don't need to use PEEK or POKE. just use
    Code:
    MyVar var byte
    
    MyVar=PORTB
    BUT
    fOR EXAMPLE when i had 5 volts only at RB0 (and the others had no voltage)
    By NO VOLTAGE do you mean that those pin are left floating??? IF so pull-down resistor will help.

    A PIC can't read nothing... it's 1 or 0. So you must set your pin to VDD or VSS with jumper or with resistor. Common val;ue for pull-down/pull-up 10K or less. AND, personally, when i use to set a pin to VDD or VSS i add a resistor in serie for current limiting.
    Last edited by mister_e; - 27th August 2005 at 13:04.
    Steve

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

Similar Threads

  1. PICs can do more if use others than delays instructions
    By hardcore in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 24th February 2010, 20:52
  2. Problem accessing keypad on PortB (LabX1, PIC 18F452)
    By scorpion4377 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 15th January 2009, 04:52
  3. shifting problem
    By helmut in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 31st August 2007, 07:11
  4. Output PIC module
    By freelancebee in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 12th September 2005, 21:10
  5. Can anyone help a beginner in a struggle?
    By douglasjam in forum mel PIC BASIC
    Replies: 1
    Last Post: - 6th May 2005, 00:29

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