GP3 Funtion on PIC10f202


Results 1 to 8 of 8

Threaded View

  1. #1
    Join Date
    Jan 2007
    Posts
    15

    Default GP3 Funtion on PIC10f202

    Hi all,
    I am having problems getting GP3 to function as input only in a PIC10f202. Just for testing purposes I am trying to very simply blink and LED once per second on GP0 and throw in an extra pulse (pulse twice per second) when GP3 reads a low on input.

    Here is my code:
    Code:
    trisio.3 = 0
    loop:
    
    high gpio.0
    pause 100
    low gpio.0
    pause 500
    
    if gpio.3 = 0 then
    	high gpio.0
    	pause 100
    	low gpio.0
    endif
    
    pause 500
    
    goto loop
    It is currently pulsing twice per second, and the chip ceases to work when I make GP3 low by pulling it down to ground.

    I am using MPLAB IDE v7.11

    Are there any obvious settings I have missed?
    Last edited by kessral; - 5th March 2009 at 21:46.

Similar Threads

  1. problem with variable on PIC10f202
    By Samoele in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 26th October 2009, 17:29
  2. PIC10F202 Variable trouble
    By George in forum mel PIC BASIC Pro
    Replies: 22
    Last Post: - 13th October 2006, 02:14
  3. using gp3 12f629
    By grounded in forum Schematics
    Replies: 4
    Last Post: - 23rd August 2005, 21:15
  4. Problem with Picbasic Pro and PIC10F202, PIC10F206
    By mikaljan in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 11th May 2005, 21:02

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