In theory this should be simple - build a divide by two circuit with a JK flip flop using a push switch for its clock... but it's not working out that way. is is my circuit, as breadboarded/prototyped...
When I turn the circuit on, I expect to find the LED either on or off, and for a button press to toggle it (though I realise that the switch needs debouncing too). What I actually get is the LED flickering a half brightness. When I hit the switch it either goes off or gets brighter (a seemingly random decision as to which).
To make sure it wasn't something to do with the switch itself, I removed the lead from the bace of the transistor to the IC and the LED went out. I also connected the base of the transistor to both Q and !Q outputs on the IC, and the same thing happens on each - flickering at half brightness and random brightening or going off on pressing the switch.
I'm pretty confounded, so if anybody can help I'd very much appreciate it.
When I turn the circuit on, I expect to find the LED either on or off, and for a button press to toggle it (though I realise that the switch needs debouncing too). What I actually get is the LED flickering a half brightness. When I hit the switch it either goes off or gets brighter (a seemingly random decision as to which).
To make sure it wasn't something to do with the switch itself, I removed the lead from the bace of the transistor to the IC and the LED went out. I also connected the base of the transistor to both Q and !Q outputs on the IC, and the same thing happens on each - flickering at half brightness and random brightening or going off on pressing the switch.
I'm pretty confounded, so if anybody can help I'd very much appreciate it.