andrew_qld
Senior Member
Hi,
I am building a circuit where a Picaxe 20x2 sends serial using the sertxd command when one of 16 inputs go low.
Everything works, but the chip resets when input C.7 goes high again.
Pins C.0 to C.7 and B.0 to B.7 are held high by 4k7 resistors. A switch pulls these pins to earth via a 1k resistor.
I have tried using let dirsc = %00000000 and several other ideas including changing components. The circuit is on breadboard prior to making a PCB and the 10k & 22k programming resistors are present. The supply is a regulated 5V. The 20X2 chip is version C.1 and the programmer is version 5.2.11
As I said, it sends serial normall when C.7 is pulled low, but as soon as the input dissapears and it goes high, the chip resets and sends the usual serial preamble on the programming pin when it starts up.
Any ideas?
Cheers,
Andrew
Here is the code:
I am building a circuit where a Picaxe 20x2 sends serial using the sertxd command when one of 16 inputs go low.
Everything works, but the chip resets when input C.7 goes high again.
Pins C.0 to C.7 and B.0 to B.7 are held high by 4k7 resistors. A switch pulls these pins to earth via a 1k resistor.
I have tried using let dirsc = %00000000 and several other ideas including changing components. The circuit is on breadboard prior to making a PCB and the 10k & 22k programming resistors are present. The supply is a regulated 5V. The 20X2 chip is version C.1 and the programmer is version 5.2.11
As I said, it sends serial normall when C.7 is pulled low, but as soon as the input dissapears and it goes high, the chip resets and sends the usual serial preamble on the programming pin when it starts up.
Any ideas?
Cheers,
Andrew
Here is the code:
Code:
main:
if pinc.0 = 0 then pause 100 endif
if pinc.0 = 0 then sertxd ("0") endif
if pinc.1 = 0 then pause 100 endif
if pinc.1 = 0 then sertxd ("1") endif
if pinc.2 = 0 then pause 100 endif
if pinc.2 = 0 then sertxd ("2") endif
if pinc.3 = 0 then pause 100 endif
if pinc.3 = 0 then sertxd ("3") endif
if pinc.4 = 0 then pause 100 endif
if pinc.4 = 0 then sertxd ("4") endif
if pinc.5 = 0 then pause 100 endif
if pinc.5 = 0 then sertxd ("5") endif
if pinc.6 = 0 then pause 100 endif
if pinc.6 = 0 then sertxd ("6") endif
if pinc.7 = 0 then pause 100 endif
if pinc.7 = 0 then sertxd ("7") endif
if pinb.0 = 0 then pause 100 endif
if pinb.0 = 0 then sertxd ("8") endif
if pinb.1 = 0 then pause 100 endif
if pinb.1 = 0 then sertxd ("9") endif
if pinb.2 = 0 then pause 100 endif
if pinb.2 = 0 then sertxd ("10") endif
if pinb.3 = 0 then pause 100 endif
if pinb.3 = 0 then sertxd ("11") endif
if pinb.4 = 0 then pause 100 endif
if pinb.4 = 0 then sertxd ("12") endif
if pinb.5 = 0 then pause 100 endif
if pinb.5 = 0 then sertxd ("13") endif
if pinb.6 = 0 then pause 100 endif
if pinb.6 = 0 then sertxd ("14") endif
if pinb.7 = 0 then pause 100 endif
if pinb.7 = 0 then sertxd ("15") endif
goto main