Menu

RMW problem solution

Gigi
2025-09-13
2025-09-21
  • Gigi

    Gigi - 2025-09-13

    The RMW problem is solved but now I have a new problem with a Pic16f819 and I need some door pins to be used as inputs for buttons.
    Unfortunately it is currently unable to read the state of some single pin, there is also the provisional possibility of achieving this.

     
  • Anobium

    Anobium - 2025-09-17

    Post example code to show the issue.

     
  • Gigi

    Gigi - 2025-09-18

    I wrote test program.
    It does not read the button on Portb.0 but on Latb.0

    I also noticed a strange behavior, if you take off the line code 25 (portb.2=0) support is not activated RMW !!
    I hope I explained myself well.
    Thank you

     
  • Anobium

    Anobium - 2025-09-19

    We are looking at two issues in the recent RWM implemention.

    So, for now ( as I am travelling ) use ASM to resolve. The ASM will read the port.bit state not LATB. I am sure this this will lead to other issues but you should be able to resolve by writing the state of the port.bit to the LATB variable.

    I have more work to do to ensure the RWM is 100% solid and I thank you for your patience.

    #chip 16F819,8
    #option explicit
    
    #option Shadowregister PORTB
    
    #define PULS      PORTB.0   ' p.6 - input pulsante
    dir portb.0 in
    
    
    //IF PULS = 1 THEN 
    BTFSC PORTB, 0        ; Test actual pin state of PORTB.0
    GOTO PORTB0_HIGH      ; Skip if PORTB.0 is high
    PORTB0_LOW:
    
        // Do things
    
    PORTB0_HIGH:
    
        // Do things
    
    // Remainder of code
    
     
  • Gigi

    Gigi - 2025-09-21

    Okay there is no problem I don't have something urgent, I wait for the definitive MRW implementation to be placed.

     

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.