Closed stowite closed 11 years ago
The issue is analyzed at JavaRanch & youtube: http://www.coderanch.com/t/619382/arduino/Testing-Arduino-logic-analyzer http://youtu.be/JDUkaX3wfXg
Thanks for submitting this issue. I fixed the preprocessor logic. It should have been checking all three types on the first one and no 'elif' on the second. It looks good on my Mega now. Let me know if you see any more issues in v0.12.
Thank you!
The conditional compilation logic in the code for the 2 MHz (logic_analyzer_inline_2mhz.ino) and the 4 MHz (logic_analyzer_inline_4mhz.ino) is flawed. For example in the 2 MHz code one sees ...
logicdata[530] = CHANPIN;
INLINE_NOP;
logicdata[531] = CHANPIN;
INLINE_NOP;
if defined(AVR_ATmega328P)
logicdata[532] = CHANPIN;
INLINE_NOP;
...
logicdata[1022] = CHANPIN;
INLINE_NOP;
logicdata[1023] = CHANPIN;
INLINE_NOP;
elif defined(AVR_ATmega1280) || defined(AVR_ATmega2560)
logicdata[1024] = CHANPIN;
INLINE_NOP;
logicdata[1025] = CHANPIN;
INLINE_NOP;
...
which means that only the ATmega328P ever uses locations 532 to 1023 inclusive.
For anything else this results in a gap in the record sent to the client since the 'logicdata' locations in this range are never used.