12F629 beginning


Results 1 to 12 of 12

Threaded View

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


    Did you find this post helpful? Yes | No

    Default

    Yeah but you also need to define LED as output. By default all I/o are configured as input... so TRISIO=%11111111.

    what if you're using the following
    Code:
    TRISIO=%11111110 ' Set GP0 as output, other to input
    This will set all I/Os in one shot, and configure GPIO.0 as an output

    You could still leave your current TRISIO setting as is but use HIGH LED and LOW LED instead. HIGH/LOW set the according pin to Output for you.

    Depending the frequency you want to measure, COUNT may work well or not. I would use a internal timer instead for that... but it's me.

    First make sure there's no real big DC offset which could trick the TTL threshold level.. hence produce weird/erratic results.

    What happen if you comment the DEFINE OSCCAL... line?
    Last edited by mister_e; - 1st October 2007 at 23:18.
    Steve

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

Similar Threads

  1. 12f629 config settings
    By Dennis in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 1st December 2009, 23:39
  2. Basic help for 12F629
    By Gene Choin in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd September 2009, 05:06
  3. Servo control with 12F629
    By achilles03 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 24th June 2005, 00:34
  4. Program returns to beginning at interupt
    By BGreen in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 25th April 2005, 12:20
  5. 12F629 I2C problems
    By AIW128ProGuy in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 12th November 2004, 00:41

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