Beware the forgotten Debug

kenmac

Member
Hi folks,
I've just experienced an event with a 08, which had me puzzled for a while.
I'd finished programming it to control a couple of transistor/relay and LED outputs, one of which was on Pin0.
Having disconnected the programming cable, I was in the process of final testing when I noticed that the Pin0 LED was pulsing in bursts, whenever the switch that was connected to Pin4 was activated.
When that pin was at 0 all was OK and no pulsing.
This had me scratching my head a bit until, while having a cuppa, I suddenly realised what was happening.
Originally I couldn't think why it only happened when that switch was turned on.
The cause was a Debug command that had been left in the section of code that runs when the switch was operated.
It was simply sending out Debug info as commanded.
A quick edit, reprogram, and all is well.

kenmac
 
Top