Can't keep a pin low


Results 1 to 16 of 16

Threaded View

  1. #3
    Join Date
    Nov 2004
    Location
    Saskatchewan Canada
    Posts
    189


    Did you find this post helpful? Yes | No

    Default

    Hmmm, can there be a fourth choice?

    I swapped PICs with no change
    I've triple checked all the connections on the breadboard

    That leaves a code problem.

    Here is the first part of that:

    @ DEVICE pic12F629, INTRC_OSC_NOCLKOUT ' Internal Oscillator
    @ DEVICE pic12F629, WDT_ON ' Enable watch dog timer
    @ DEVICE pic12F629, PWRT_ON ' Enable power up timer
    @ DEVICE pic12F629, MCLR_ON ' Enable MCLR pin

    Define OSCCAL_1K 1 ' Oscillator calibration

    TRISIO = %11101011 ' turn all I/O to input except GPIO.2 and GPIO.4

    CMCON = 7 ' Disable analog comparator

    Which is working for all other input and output.

    As far as I can tell there is no command that is not allowed. It is all basic stuff like driving a buzzer based on buttons pressed - really nothing fancy. A single input on any of the other lines that does nothing but make a beep seems to be flipping that pin - and that buzzer is on port 2.

    I'll keep going through the code.

    Thanks.

    Bart

    I just tried something simple and discovered that when my port 2 goes HIGH, port 4 is going HIGH at the same time, but it will not switch back when port 2 goes LOW again.

    Does that suggest anything?
    Last edited by bartman; - 2nd January 2006 at 17:06.

Similar Threads

  1. Is this a K Type sensor?
    By jessey in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 21st November 2009, 14:55
  2. Old and beyond help ?
    By DavidFMarks in forum mel PIC BASIC Pro
    Replies: 46
    Last Post: - 11th December 2008, 16:23
  3. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 18:27
  4. Another RTC, DS1287
    By DavidK in forum Code Examples
    Replies: 0
    Last Post: - 12th December 2006, 18:07
  5. 4-line LCD Help - using PortA instead of B
    By Tom Gonser in forum mel PIC BASIC Pro
    Replies: 28
    Last Post: - 31st March 2005, 04:14

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