I am testing the Mega2650 board with Marlin firmware loaded. The Endstop pins (D3 for X-min, etc) has about 4.9v when not connected to the switch. When I issue M119, it reports "Open" for all axis. If I ground the Endstop pins (such as D3 for X-min), it will report "Triggered" when M119 is issued.
The confusion is that from everything I read, the endstop switch should be NC which means connected when not triggered, which also means the endstop pin should be grounded when not triggered. This is just the opposite to my situation described above.
I checked the "Configuration.h" file and found there is the original statement "X_MIN_ENDSTOP_INVERTING=true" which would allow me to invert the logic if I set it to false instead. However, it doesn't say what the logic is when not inverted. I guess that if I set it to false, it would do what I was expecting it to do, but again, I thought that the convention was that the endstop pins are grounded by default, which apparently is not in my case.
The pullup resistors are enabled in the configuration file so I don't need external pullup resistors (actually it didn't make any logical difference when I tried to add pullup resistors here).
If anyone can explain the logic and see what (if anything) is wrong in my case, I would appreciate it.
Thanks.