12f675 GPIO Problem. No output on GPIO.2


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190

    Default 12f675 GPIO Problem. No output on GPIO.2

    Seems so simple I'm missing something ! Using a protoboard with leds on each output then Relay2 doesn't work.


    Code:
    ;*****************************************************
    ;                                                                             
    ; Target Controller -     PIC12F675   - Linear RF Amplifier Sequencer          
    ;                              _______                                         
    ;                VDD +5V  |1       8| Vss Ground                              
    ;              PTT   -GP5 |2       7| GP0--Ant Relay                         
    ;          Standby -GP4 |3       6| GP1--Relay 1                            
    ;                      -GP3 |4       5| GP2--Relay 2                           
    ;                              --------                                          
    ;                                                                             
    ; *****************************************************
    
    Antenna VAR GPIO.0
    Relay1   VAR GPIO.1
    Relay2   VAR GPIO.2
    
    Standby VAR GPIO.4      ;inhibit ptt swtch
    PTT       VAR GPIO.5
    
    
    TRISIO = %00110000        ; GPIO 4 & 5 as inputs
    ADCON0 = 0                    ; adc off
    ANSEL = 0 
    CMCON=7                       ; comparator off
    Define OSC 4
    
    pause 50                  ; Settle time
    
    main:
    
          IF standby = 0 then main
          
          WHILE PTT = 0 
          HIGH Antenna
          PAUSE 100
          HIGH Relay1
          PAUSE 10
          HIGH Relay2
    
          WEND
          
          LOW Relay2
          PAUSE 10
          LOW Relay1
          PAUSE 100
          LOW Antenna
          
          GOTO main
          
    END
    Rob.

    The moment after you press "Post" is the moment you actually see the typso

  2. #2
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: 12f675 GPIO Problem. No output on GPIO.2

    Sorry guys, no problem with code.

    Duff track on protoboard !
    Rob.

    The moment after you press "Post" is the moment you actually see the typso

  3. #3
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: 12f675 GPIO Problem. No output on GPIO.2

    Ah no it isn't.

    LED current limit resistor missing on that led, it overstretched the output capability. Fixed and works as wanted.
    Last edited by tasmod; - 2nd June 2014 at 16:05.
    Rob.

    The moment after you press "Post" is the moment you actually see the typso

Similar Threads

  1. How to set GPIO.5 as output ?
    By Sam in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 25th July 2015, 09:51
  2. 12F683: I change GPIO.5 but GPIO.0 also changes...why?
    By chicowoodhill in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 4th December 2012, 17:09
  3. Replies: 1
    Last Post: - 29th February 2012, 09:37
  4. 12F683 GPIO.3 problem
    By ozarkshermit in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 30th October 2009, 08:43
  5. 12F675 A/D and GPIO sleep interrupt
    By macinug in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 8th September 2008, 14:39

Members who have read this thread : 1

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