Menu

PIC16F1937 MCLR=OFF / ON Configuration not valid

Help
JB
2024-05-28
2024-05-28
  • JB

    JB - 2024-05-28

    Hello everyone,

    Is it possible to setup the MCLR to OFF or ON with the following code.
    (Warning: Configuration setting not valid: MCRL=OFF)

    Thank's

    #chip PIC16F1937,32
    #config MCRL=OFF
    dir portA out
    dir portB out
    dir portC out
    
    dir portD out
    dir portE.0 out
    dir portE.1 out
    dir portE.2 out
    dir portE.3 IN
    
    if portE.3 = 0 then
    
    do
    portA =0b11111111
    portB =0b11111111
    portC =0b11111111
    portD =0b11111111
    portE =0b1111
    
    pause 500
    
    portA =0b00000000
    portB =0b00000000
    portC =0b00000000
    portD =0b00000000
    portE =0b000
    
    pause 500
    loop
    else
    end if
    
     
  • Anobium

    Anobium - 2024-05-28

    The answer is NO, as the configuration you are using is invalid.

    Use PICINFO this is an option within the IDE. ( or within your installation ). PICINFO has a UI that enables your to ensure the config is valid.

    So, find PICINFO, selection your chip, change the config, copy and paste into your code. It will work.

    But, as you use PICINFO you will see the defaults for the config is shown. And, you may not need to update the config as the GCBASIC defaults may meet your needs.

    Evan

     
  • JB

    JB - 2024-05-28

    Thank's
    my mistake
    I've corrected the error : MCRL=OFF should be MCLRE=OFF

     
  • Anobium

    Anobium - 2024-05-28

    :-)

    But, you do not need it. PICINFO will show you the defaults and GCBASIC sets MCLRE=OFF ( for that chip).

    Evan

     
  • JB

    JB - 2024-05-28

    Yes indeed , looked at PICINFO.
    very useful.

     
    • Anobium

      Anobium - 2024-05-28

      PICInfo exposes the selected chips information.

      If any information is missing, that you think would be useful. Please let us know. If we can source the information then we should be able to add to PICInfo.

       
      ❤️
      2

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.