16F676 Really simple, stupid problem - Help!


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2008
    Posts
    6

    Default 16F676 Really simple, stupid problem - Help!

    Okay I have a VERY strange issue.

    If I set both PORTA.0 and PORTA.1 high, compile and program the chip -- Nothing works.
    Here is an example:
    -------------
    @ DEVICE pic16F676, MCLR_OFF

    LED1 VAR PORTA.0
    LED2 VAR PORTA.1

    loop:

    HIGH LED1
    HIGH LED2

    PAUSE 500

    Goto loop
    ---------------
    The strange thing is, if I write the equivalent program in GCBasic, it seems to work fine. What am I missing here? Is there an environment setting that I don't know of?

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


    Did you find this post helpful? Yes | No

    Default

    Have a look at the following
    http://www.picbasic.co.uk/forum/showthread.php?t=561

    HTH
    Steve

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

  3. #3
    Join Date
    Sep 2004
    Location
    Mentor, Ohio
    Posts
    352


    Did you find this post helpful? Yes | No

    Smile

    Hi Jayhovah,

    After you finish learning how to use PortA pins as Mister E pointed out you might want to turn the pins off after the pause statement because all you loop current does is turns the LEDs on.

    loop:

    HIGH LED1
    HIGH LED2

    PAUSE 500

    LOW LED1
    LOW LED2
    PAUSE 500

    Goto loop


    BobK

  4. #4
    Join Date
    Apr 2008
    Posts
    6


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e View Post
    Thanks! this solved it..

Similar Threads

  1. Simple program - Strange problem!
    By Megahertz in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 19th December 2009, 22:52
  2. 16F676 programming problem
    By Christopher4187 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 18th May 2009, 17:39
  3. 16F676 Please explain this problem...
    By Jayhovah in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 9th May 2008, 21:30
  4. Simple problem?
    By FastEddie in forum mel PIC BASIC
    Replies: 5
    Last Post: - 3rd March 2007, 17:28
  5. Problem during compilation 16F676
    By mat janssen in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 7th October 2005, 07:05

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