Narrative:

I was given clearance for takeoff and climb to 3000 ft and expect 6000 ft. After takeoff controller told me transponder was set to wrong code. I reset transponder. I was then told it was still wrong code. Transponder was squawking different than settings indicated. In the meantime I had set the autoplt to the designated heading. While working with transponder the autoplt failed. The aircraft had rolled to the right with wings almost vertical. I immediately started working to control aircraft. In the meantime I failed to monitor altitude and heading. I still feel aircraft control was more important. I had busted the 3000 ft and was about 90 degrees off heading. This course of events occurred in about 2 or 3 mins. The autoplt and transponder are now being svced.

Google
 

Original NASA ASRS Text

Title: BE35 PLT LOSES CTL OF ACFT WHILE TROUBLESHOOTING FAULTY XPONDER IN LIT AIRSPACE.

Narrative: I WAS GIVEN CLRNC FOR TKOF AND CLB TO 3000 FT AND EXPECT 6000 FT. AFTER TKOF CTLR TOLD ME XPONDER WAS SET TO WRONG CODE. I RESET XPONDER. I WAS THEN TOLD IT WAS STILL WRONG CODE. XPONDER WAS SQUAWKING DIFFERENT THAN SETTINGS INDICATED. IN THE MEANTIME I HAD SET THE AUTOPLT TO THE DESIGNATED HEADING. WHILE WORKING WITH XPONDER THE AUTOPLT FAILED. THE ACFT HAD ROLLED TO THE R WITH WINGS ALMOST VERT. I IMMEDIATELY STARTED WORKING TO CTL ACFT. IN THE MEANTIME I FAILED TO MONITOR ALT AND HEADING. I STILL FEEL ACFT CTL WAS MORE IMPORTANT. I HAD BUSTED THE 3000 FT AND WAS ABOUT 90 DEGS OFF HEADING. THIS COURSE OF EVENTS OCCURRED IN ABOUT 2 OR 3 MINS. THE AUTOPLT AND XPONDER ARE NOW BEING SVCED.

Data retrieved from NASA's ASRS site as of July 2007 and automatically converted to unabbreviated mixed upper/lowercase text. This report is for informational purposes with no guarantee of accuracy. See NASA's ASRS site for official report.