Verification

Fowkc

Senior Member
I've seen people use a spare output pin and have an LED flashing out the version number of the program on the chip. This isn't verification as such, but it can help when you simply can't remember exactly what you downloaded 5 and a half weeks ago...
 

Rickharris

Senior Member
I've seen people use a spare output pin and have an LED flashing out the version number of the program on the chip. This isn't verification as such, but it can help when you simply can't remember exactly what you downloaded 5 and a half weeks ago...
Or writ it into an unused variable and sertxd it to the PC at the start of the programme or some unique event.
 

womai

Senior Member
If you meant if there is a possibility to assure the program got downloaded correctly, as far as I know the Programming Editor receives a checksum from the Picaxe at the end of the download, which it compares to the checksum it calculates itself. It's not an absolutely rigorous way of verification, but if those two numbers match, chances are extremely close to 100% the program downloaded correctly.

Technical may be able to add details.

Wolfgang
 

hippy

Technical Support
Staff member
There's no checksum I'm aware of but the Programming Editor does check every byte sent is echoed back and is correct. It's not entirely foolproof but works in nearly all cases.
 

BeanieBots

Moderator
@ Hippy,
I appreciate the possibility of error with checksum verification, but what could be the failure mechanism with 100% echo?
Is it that the echo comes before EEPROM write?
 

inglewoodpete

Senior Member
BB: I think the case would be when you have (say) a 1 bit 'flip' in a byte on the download and then the echo gets the same bit inverted. The PC thinks the byte downloaded OK but the code in the PICAXE contains an error.
 

Technical

Technical Support
Staff member
BB: I think the case would be when you have (say) a 1 bit 'flip' in a byte on the download and then the echo gets the same bit inverted. The PC thinks the byte downloaded OK but the code in the PICAXE contains an error.
This would not happen as the download:

PC sends byte from memory map
PICAXE writes byte to memory
PICAXE reads byte back
PICAXE transmits byte
PC receives byte
PC compares byte received to expected value in memory map

So even if the transmitted byte was 'flipped' the download would still fail as it does not match the original memory map.
 

inglewoodpete

Senior Member
Maybe I wasn't clear enough in my original description. I was meaning that an error occurs on the same bit on both the download and then upload (2 complimentary errors). Ie the PICAXE stores an inverted bit but the PC receives the byte where a second error masks the original error.

Obviously, this should be a rare occurrence. However, if the PC to PICAXE connection is flakey, 1 in 64 or so (8 x 8) errors on a byte could fit the case.
 

BeanieBots

Moderator
I see your point/theory Inglewoodpete, but I can't imagine it to be very likely.
Not only does the return bit have to fail in an identical way to the send bit, but the bit location within the byte must be the same AND no other error must occur or there will be a termination due to error.
So, not impossible, but equally not very plausible IMHO.
 
Top