simple program, what am i missing


Closed Thread
Results 1 to 5 of 5
  1. #1
    scorpion's Avatar
    scorpion Guest

    Default simple program, what am i missing

    Hi. I have a multi purpose board That i made using a pic16f676. I am using it for 2 hall effects to 2 PWM signals and it worked great... but now I am just trying to blink a couple of leds and its not working at all....

    here is what i have (I cut the program way down to try to find the issues)

    trisa = 0
    trisc = 0

    main:
    low ledout
    pause 350
    low buzzerout
    pause 50
    high ledout
    high buzzerout
    pause 400
    goto main

    straight forward enough... but they are blinking at opposite times... is there something basic im missing?

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


    Did you find this post helpful? Yes | No

    Default

    as i presume you place your stuff on the PORTA or else analog multiplexed, place those line before the main...
    Code:
    CMCON=7 ' disable analog comparator
    ANSEL=0 ' disable A/D converter
    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=497&stc=1">
    Attached Images Attached Images  
    Steve

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

  3. #3
    scorpion's Avatar
    scorpion Guest


    Did you find this post helpful? Yes | No

    Default

    sorry i did have cmcon = 7
    but it wont compile if i set adsel

  4. #4
    scorpion's Avatar
    scorpion Guest


    Did you find this post helpful? Yes | No

    Default

    where did you get that gif of me?
    I was trying to compile it for the wrong pic.... i cant believe that it took me 2 days and a post to figure it out.....
    thank you for your help

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


    Did you find this post helpful? Yes | No

    Default

    S.h.i.t. happen
    Steve

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

Similar Threads

  1. Simple Blink program doesnt work.
    By sccoupe in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 1st March 2009, 20:30
  2. Help with simple program
    By mykewl in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 31st July 2008, 08:58
  3. Simple program for 12F629
    By rele in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 28th July 2008, 17:19
  4. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  5. Simple Interrupt Program
    By eoasap in forum General
    Replies: 5
    Last Post: - 28th October 2005, 16:22

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