So for the past few years I occasionally get a code 19 when I turn on the ignition, cycle it a few times and it goes away. Sometimes when I'm riding (usually hard acceleration) the bike shuts off and the code comes up, cycle the key and it goes away. Sometimes the bike dies under acceleration and no code comes up, cycle the key and it's working again. Twice recently I hit the start button and hear some solenoid clicking but nothing happens and the dash resets itself. Clock goes to 12:00.
I first tried changing the spark plug, and it seemed o.k for a while but came back, changed plugs a few more times with the same results. Stripped it all down this year and checked all the wires and connections, found nothing obvious. Today I decided to remove the sidestand switch, so just for the heck of it I unplugged the connector for it and gave the key a whirl. The 19 code only came on 2 out of ten times I cycled the key and the bike would start when it wasn't on. Shouldn't it come on every time with the switch unplugged? Always cranks over but does not start when the code is on.
I'm at a loss of things to try. I have all the popular mods, pipe, programmer, speedo healer, emmisions stuff removed, etc.. Two things I have not tried is fully checking out all the stuff behind the headlight and the ignition switch itself, but it all looks fine from what I can see looking in there. Also the bike is an 08 with the original battery. The battery seems to work just fine, is seems strong, but it is old. Not sure if an old battery would cause these issues.
Any ideas/advice?