I need Help about PBP proyect, by PIC-18F45K20 and GSM module


Results 1 to 3 of 3

Threaded View

  1. #3
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154

    Default Re: I need Help about PBP proyect, by PIC-18F45K20 and GSM module

    If you gosub contverde, you must have a RETURN at the end to come back.

    Same with gosub cuelga.


    gosub contverde
    ;------------------------------------------------------------------------------
    ; Miramos si esta activo el rojo si no lo esta, seguimos mirando
    ; para asi verificar que está en transito la llamada.

    mirarVerde:
    if ldgreen=1 and tamper=0 then mirarVerde
    if ldgreen=0 and tamper=0 then llama2 ; tengo dudas aqui <=== this means GOTO LLAMA2
    ContVerde:
    if ldgreen=1 and tamper=0 then CondiCuelga=1 ; aqui esta el problema
    if tamper=0 and CondiCuelga=1 then gosub cuelga
    RETURN <=== are you sure you don't want a RETURN here?
    cuelga:
    pause 10
    low relcall
    ;if condicuelga=0 and tamper=0 then goto cuelga
    ;if ldgreen=1 and tamper=0 then goto inicio
    RETURN <=== are you sure you don't want a RETURN here?
    end
    Very important, if you GOSUB to a subroutine, do not GOTO out of it.

    You must stay within the subroutine and exit using RETURN.

    There are probably exceptions, but you can quickly get into trouble if you don't keep your logic clean.
    Last edited by Demon; - 8th April 2016 at 03:45.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

Similar Threads

  1. Trying to build a PCB with onboard GSM Module
    By financecatalyst in forum GSM
    Replies: 1
    Last Post: - 13th August 2012, 15:50
  2. Using Gsm module in Data Mode
    By isaac in forum GSM
    Replies: 4
    Last Post: - 13th October 2011, 16:36
  3. sending string to module GSM with character ""
    By volcane in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 2nd May 2010, 02:26
  4. Module GSM Telit GM862
    By volcane in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 3rd November 2007, 10:51
  5. Using gsm module in data mode
    By isaac in forum GSM
    Replies: 0
    Last Post: - 25th September 2007, 15:21

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