Loop Problem please help


Results 1 to 8 of 8

Threaded View

  1. #7
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default Disable the analogue inputs

    ANSEL = %00000000 ' Disable Analogue Inputs

    I had the same problem the first time I used a 16F88

    Oops, just realise that you NEED analogue inputs but disable the ones that are on the Port B pins that you are using

    Use ANSEL=%00000001 ' Enable AN0 only

    By default the analgue inputs are enabled. To update your LCD display the PortB data register is read, modified and written back to. Because B6 (your relay pin) by default is AN5, this is read as a ZERO rather than the ONE you set it to in your code. This means that when you initially set it it works OK but as soon as the LCD is updated again it gets rewritten as ZERO.

    HTH
    Last edited by keithdoxey; - 15th July 2006 at 14:39.
    Keith

    www.diyha.co.uk
    www.kat5.tv

Similar Threads

  1. Controlsystem for compact sporting (clay shooting)
    By Fredrick in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 30th July 2009, 17:48
  2. Using input from Switch to control a loop
    By MrRoboto in forum mel PIC BASIC
    Replies: 9
    Last Post: - 2nd February 2009, 06:02
  3. Serin to Serin2 ??
    By Gixxer in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 25th January 2008, 04:56
  4. Serial Relays
    By tazntex in forum General
    Replies: 3
    Last Post: - 17th May 2007, 18:42
  5. Newbie question:
    By Izone in forum mel PIC BASIC
    Replies: 2
    Last Post: - 26th February 2006, 17:24

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