16F684 Basic Functionality


Closed Thread
Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429


    Did you find this post helpful? Yes | No

    Default

    Strange. I have seen toggle do strange things before but cant remember what the problem was.

    Out of interest, does it work if you use the following instead of toggle:

    IF Heart_Beat_LED=0 THEN
    Heart_Beat_LED=1
    ELSE
    Heart_Beat_LED=0
    ENDIF

    PAUSE 1000
    "I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams

  2. #2
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default analog blues perhaps

    cmcon0 = 7 'Comparators off. CxIN pins are configured as<b> digital I/O</b>
    cmcon0 = 0'Comparators off. CxIN pins are configured as analog
    Last edited by Archangel; - 25th September 2009 at 19:03.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  3. #3
    Join Date
    Nov 2008
    Posts
    22


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Joe S. View Post
    cmcon0 = 7 'Comparators off. CxIN pins are configured as<b> digital I/O</b>
    Thanks Joe S., I should know better. All is fine now.

  4. #4
    Join Date
    Nov 2008
    Posts
    22


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Kamikaze47 View Post
    Strange. I have seen toggle do strange things before but cant remember what the problem was.
    Me too.

    IF Heart_Beat_LED=0 THEN
    Heart_Beat_LED=1
    ELSE
    Heart_Beat_LED=0
    ENDIF

    PAUSE 1000
    Nada, doesn't work. Pin stays high, don't see any change with a scope. It always sees Heart_Beat_LED = 0.

    Interestingly enough, which I left off the earlier post, if I write:

    Code:
    serout Terminal_TX,6,["1-Heart_Beat_LED = ",#Heart_Beat_LED,13,10]
    serout Terminal_TX,6,["2-Heart_Beat_LED = ",#Heart_Beat_LED,13,10]
    The value remains zero in each SEROUT.

Similar Threads

  1. Indexer not indexing...a basic PBP problem??
    By jellis00 in forum General
    Replies: 8
    Last Post: - 24th March 2009, 16:53
  2. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 8th December 2008, 23:40
  3. using AND as an IF statement
    By dw_pic in forum mel PIC BASIC
    Replies: 27
    Last Post: - 8th June 2006, 18:05
  4. vb6 to pic basic
    By Darrenmac in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 19th December 2005, 01:56
  5. The Ultimate PIC Basic
    By picnaut in forum PBP Wish List
    Replies: 4
    Last Post: - 9th November 2004, 22:10

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