Menu

delay_ms

Help
Anobium
2011-12-24
2013-05-30
  • Anobium

    Anobium - 2011-12-24

    I had an issue with a 12F675.

    I had copied a piece of code from the format, changed etc.  But, I was having a large delay on power up of the Pic.

    I deleted 'delay_ms'.  And, it now seems ok.

    What does 'delay_ms' do? This was on a line on it own as shown below.

    #config Osc = int, MCLRE=OFF, WDT=OFF
    delay_ms
    'Set the pin directions

    DIR GPIO.0 IN
    DIR GPIO.2 OUT
    #define LED1Port GPIO.2

    Happy Holidays!

     
  • Nobody/Anonymous

    Where did you come up with that command "delay_ms"?  I did not see it in the GCBASIC manual.  Some other compilers might support that and maybe you copied code from another compiler and somehow it wacks out GCBasic.

    Best I can tell, wait is the delay command for this compiler. 

    Anyway, it is not in the manual, and not an assembler command, so it should not be in you code.

     
  • gcha44

    gcha44 - 2011-12-25

    Hi,  "Delay_ms" is a command you can find in MikroBasic for Pic . The equivalent command In GCBasic is "Wait … ms"

     
  • Anobium

    Anobium - 2011-12-26

    Re 'Delay_ms"… I found the command here   .. https://sourceforge.net/projects/gcbasic/forums/forum/579126/topic/3326725

    My question is: Would this command have the effect of preventing the pic from booting correctly?

     
  • Nobody/Anonymous

    "Delay_ms" is a command you find in source code of  GCBasic compiler .
    But the "delay_ms"  you find in the sample is to call to a subroutine called "delay_ms" .
    I presume that subroutine  is written like this :
    <sub delay_ms
       wait 1 ms
    end sub>

    The sample you find is just a piece of code and only reads AN0 after waiting 1ms (???)

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.