• AVR Freaks

Hot!Logic Analyzer shows "Volts" instead of "0" and "1"

Author
Ivan Cenov
Super Member
  • Total Posts : 294
  • Reward points : 0
  • Joined: 2003/11/07 12:36:51
  • Location: Bulgaria
  • Status: offline
2020/06/05 00:00:24 (permalink)
0

Logic Analyzer shows "Volts" instead of "0" and "1"

Hello,

My configuration id MPLAB 5.40 / XC8 2.20 / PIC16F18346
The application sends RC5 protocol output to RA5 output. It is configured as digital output and the low and high levels are seen in the LATA register in Watch window (ANSELA.5 = 0, TRISA.5 = 0). However, in Logic Analyzer RA5 pin is treated as analog - Y axe is "Volts", not "0" and "1".

Why is that behavior? Something that I am missing or Simulator's Analyzer bug?
 
Ivan
#1

5 Replies Related Threads

    PStechPaul
    Super Member
    • Total Posts : 2919
    • Reward points : 0
    • Joined: 2006/06/27 16:11:32
    • Location: Cockeysville, MD, USA
    • Status: online
    Re: Logic Analyzer shows "Volts" instead of "0" and "1" 2020/06/05 00:57:01 (permalink)
    -1 (1)
    The simulator for MPLABX uses voltage instead of logic levels for pin stimulus. I haven't fooled around with it much, but you should be able to use 0 and Vdd for logic low and high. I don't know if you can see how it reacts to TTL levels such as 0.5 volts and 4.5 volts or intermediate voltages. And I don't know if output voltages are realistic, although they should be pretty much rail to rail without load. And I don't think you can simulate loading. Maybe George will provide his expertise here. :)

     
    #2
    Ivan Cenov
    Super Member
    • Total Posts : 294
    • Reward points : 0
    • Joined: 2003/11/07 12:36:51
    • Location: Bulgaria
    • Status: offline
    Re: Logic Analyzer shows "Volts" instead of "0" and "1" 2020/06/05 01:08:27 (permalink)
    0
    In fact, the logic analyzer window does not collect and does not show any data. It is just empty after simulation...

    The trace is disabled and it seems that here is the problem, but I cannot see where to enable trace (in MPLAB X 5.40).
    post edited by Ivan Cenov - 2020/06/05 01:14:11
    #3
    GeorgePauley
    Moderator
    • Total Posts : 1268
    • Reward points : 0
    • Joined: 2009/12/01 13:59:30
    • Location: Chandler AZ
    • Status: offline
    Re: Logic Analyzer shows "Volts" instead of "0" and "1" 2020/06/05 08:30:26 (permalink)
    +3 (3)
    The way it is supposed to work is 0/1 if the pin is digital, voltage if the pin is analog.

    You do not need trace to use the logic analyzer.  The logic analyzer does not render while the simulator is actually running (that would slow the simulator down.. a LOT).  So you have to halt the debug session to see the latest graph.  (Halt not stop!).  Finally the system is a bit delicate and you usually have to have the logic analyzer set up before you actually start running the debugger.
    #4
    Ivan Cenov
    Super Member
    • Total Posts : 294
    • Reward points : 0
    • Joined: 2003/11/07 12:36:51
    • Location: Bulgaria
    • Status: offline
    Re: Logic Analyzer shows "Volts" instead of "0" and "1" 2020/06/05 22:25:34 (permalink)
    0
    GeorgePauley
    The way it is supposed to work is 0/1 if the pin is digital, voltage if the pin is analog.

    You do not need trace to use the logic analyzer.  The logic analyzer does not render while the simulator is actually running (that would slow the simulator down.. a LOT).  So you have to halt the debug session to see the latest graph.  (Halt not stop!).  Finally the system is a bit delicate and you usually have to have the logic analyzer set up before you actually start running the debugger.




    I have used Logic analyzer many times successfully and now wonder why I cannot make it work as before.
    Well, before starting debug session, I setup RA5 pin in the analyzer. Then I set break points and activate debug session. The real manipulating of RA5 is between the BPs (the simulator is running, not step-by-stepping). After stopping at the second BP, the analyzer windows does not show anything. Well, I halt debug session, and nothing appears...
    post edited by Ivan Cenov - 2020/06/05 22:27:12
    #5
    GeorgePauley
    Moderator
    • Total Posts : 1268
    • Reward points : 0
    • Joined: 2009/12/01 13:59:30
    • Location: Chandler AZ
    • Status: offline
    Re: Logic Analyzer shows "Volts" instead of "0" and "1" 2020/06/08 12:17:32 (permalink)
    +2 (2)
    I see this too.  It turns out that the simulator is using the trace system to transmit the pin values to the logic analyzer in MPLAB.  The trace system is broken in MPLAB X 5.40.  So the logic analyzer isn't working either.
    #6
    Jump to:
    © 2020 APG vNext Commercial Version 4.5