This subscript out of range error is really damned annoying, especially as it may be an internal Programming Editor error or the actual cause is not reported correctly or meningfully - just whose subscript is it that is out of range, and why is it allowed to go out of range ?
Part of the Gremlin's job today has obviously been to inflict every possible problem on me, and I'm now getting the same error with a PICAXE-08. Checking "Firmware?" works fine and identifies the PICAXE, but as soon as I attempt a download it goes to the "Connecting to Hardware..." splash screen, switches the title to "Downloading Program..." and then >BANG<, "Subscript out of range". With "Clear Memory" the progress bar zooms halfway across the screen at the speed of light, then slowly chugs along until it finally announces "Verification failed", or just chugs from the start.
Been using the hardware for programming reliably during the last 24 hours, yet now it's playing up, and not a clue as to why ( not entirely true, and we'll come back to my theory later ). This is not the hardware I've been tinkering about with either, so nothing's changed there. No other apps open which are using the serial port, it's set for the correct serial port, loop-back test on the cable works okay, etc, etc.
Plug in a different PICAXE-08, same Firmware version - identifies firmware fine, downloads fine, clears hardware fine. Back to the 'dodgy chip'. Identifies firmware, download and clear hardware fail as before. Try the new chip, still works perfectly. Try the old chip, still fails. Neither are labelled but it's now easy to tell which is which.
Scrape the legs clean with a scalpal, no joy.
Make sure that soldering iron is powered off, no joy.
Drop the bench PSU down from 5V to 4.5V, and it works !
Back to 5.0V and back to 'Problem City'.
Short the blocking diode on the Serial In line, no joy.
Check the serial port voltages in case I've damaged them in other experiments. Look the same as always. Unplug the modem and try a different port, no change.
Back to 4.5V and the fanfare rings out again.
What a nightmare, but the problem seems to be not enough juice from the PC serial getting through, and lowering the PICAXE volatge effectively bumps up the serial voltage ( relativity ). The explanation for why identifying firmware works but downloading doesn't, is I suspect because that's triggered by a 'break' which is simply a sustained high on the serial line, so maybe just a small glitch is enough to kick the firmware version number back, but not good enough to make download happen.
If the identify firmware works, then the Programming Editor starts its download, but the PICAXE doesn't see anything, thinks you've given up, and starts running its program. If that happens to be a serial echo program ( notch one up for Sod's Law ) or sending data out via Serial Out ( or toggling pin 0 ( another win for Sod's Law ) and it confuses the Programming Editor into thinking that teh download is happening, then gets its knickers in a complete twist and cacks it with a 'Subscript error'.
Well that's my theory anyway, and I needed to get that sob-story off my chest, it's been a frustrating 24 hours !