D13 / SCK and Modbus

I am doing Modbus communication with my Midnite Classic solar charge controller using an Arduino Mega 2560 and the SimpleModbusMasterV12 library. Recently I have been attempting communication with the Elite Systems CPU using Modbus but without success. I notice that the D13 led remains on constantly when I am attempting communication with the Elite (which does not work) but not when I communicate with the Classic (which does work). I have looked around on the forums in an attempt to learn what the led on might be telling me but I am not finding anything I think I can use. The RS232 shield I am using is the DFR Robot v1.0 shield. It's data sheet just shows the D13/SCK led connected to ground via a 4.7k resistor.

I have tried loading my Classic sketches into the mega and the D13 goes out.

I am not sure if this is a hardware or software or hardware and software problem. Any thoughts? What would cause the D13 to stay on brightly?



It must be software. Can you post both sketches?

I read a book about programming Arduino C which mentioned FFM - Flat Forehead Moments. I started removing everything not necessary to the Elite sketch in order to post it and it started to work without the D13 led on. When I looked at what I had removed realized that I had configured D13 as an output that I was using to watch when the battery voltage was lower than a certain point - which it is in this case - so the led was on. Dooh FFM.

Thanks for your help. I still can't interface with the Elite but at least I can stop thinking about D13 being a problem.