Simple question about While Wend...


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Jan 2013
    Location
    Texas USA
    Posts
    229


    Did you find this post helpful? Yes | No

    Default Re: Simple question about While Wend...

    What PIC MCU are you using?

    Should you be using LATB register instead of PORTB register for your High and Low statements?
    Read modify write may be an issue.
    Regards,
    TABSoft

  2. #2
    Join Date
    Oct 2008
    Posts
    52


    Did you find this post helpful? Yes | No

    Default Re: Simple question about While Wend...

    I am using an 18f2550.....

    Norm...I don't think I am experienced enough to use that debug code...

    I have looked back at some other code I have written and have used while/wend the same way.. should I use a pullup on portb.5 to ensure it is high?...I will try that but I think I have already..

    Thanks for helping me figure this out...

  3. #3
    Join Date
    Oct 2008
    Posts
    52


    Did you find this post helpful? Yes | No

    Default Re: Simple question about While Wend...

    I guess that was it...the pullup resistor on the input...apparently it was floating...

  4. #4


    Did you find this post helpful? Yes | No

    Default Re: Simple question about While Wend...

    Hi

    Portb on the 18f2550 has analog inputs. You need to set the those pins to digital.

    Try adding

    ADCON1 = %00111111

    This will make all the analog pins digital, see page 254 data sheet
    Last edited by mark_s; - 26th July 2015 at 01:07.

Similar Threads

  1. Very simple question (for someone)
    By lew247 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 27th December 2009, 02:36
  2. A simple and basic question
    By Ted's in forum mel PIC BASIC Pro
    Replies: 35
    Last Post: - 29th June 2008, 19:01
  3. SIMPLE question
    By ngeronikolos in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 5th February 2008, 18:27
  4. very simple loop question
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 25th January 2006, 06:45
  5. Simple Question
    By koossa in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 14th December 2005, 14:43

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