Memory verification failed - only 1 computer

amewsaj

Member
Hi,

After reinstalling my system (and a motherboard replacement), I now installed PICAXE Programming Editor again, and tried to program my 18X and 28X1 chip.

I keep getting "memory verification failed" error at random bytes, primarily while writing data. Tried on my other computer, everything's fine!!
Using the USB010 on both.

After some time I got the 28X1 to work everytime, but the 18X doesn't want to.
Works everytime from my other computer - same driver.

What could cause this weird behavior?
 

hippy

Ex-Staff (retired)
The commonest problem is probably power supply and battery supplies being a little low so if using batteries well worth trying with a fresh set.

Have you also changed OS ? Even if not, with a different motherboard it is possible that will load up different drivers for the underlying USB system ( eg different motherboard chipsets ) which might have an effect. It's also possible that physical hardware may be slightly different. Probably worth doing a serial port test for both computers and seeing what voltages are seen at the PICAXE with each.
 

amewsaj

Member
Using a 6 V power supply with voltage regulator, input to chip is 5V.

Of course there could be minor differences in the drivers/hardware, but what to do about it? Measuring conn. in a moment...
 

amewsaj

Member
Same OS...

Measuring the voltage on serial in: Same on both systems (-0,55 to 5,52)
Same for both 28x1 and 18x, but only 28x1 is programmable from one of the computers. On the other computer both are programmable.
So what to do?
 

BeanieBots

Moderator
You won't want to hear this but I had a similar issue and gave up.
When I changed from USB010 to AXE027, the problem went away.
 

amewsaj

Member
I already read that a few times - that AXE027 fixes the issue.
Weird issue... - sure it will fix it?

But when using AXE027 - I cannot make SW communicate with PICAXE as if it was COM-port right? now it's USB device?
 

hippy

Ex-Staff (retired)
I already read that a few times - that AXE027 fixes the issue.
Weird issue... - sure it will fix it?
There's no guarantee it will fix it, but it appears the case that there are fewer problems with AXE027 than USB010.

But when using AXE027 - I cannot make SW communicate with PICAXE as if it was COM-port right? now it's USB device?
Sorry I don't understand what you mean. Once the AXE027 is connected to the PC with drivers installed it should be accessible using a COM port just as the USB010 is. It will likely have a different COM number assigned.
 

BeanieBots

Moderator
But when using AXE027 - I cannot make SW communicate with PICAXE as if it was COM-port right? now it's USB device?
No, the SW will create a virtual COM port that it communicates through.
The USB aspect is transparent to you. For the user, it is the same as USB010 but the port number will be different.
 

john2051

New Member
Hi, I dont know anything about win7 yet, but on my xp machines, using a usb to serial converter, I had to uncheck the power setting for the internal usb chip. As default, windows turns off power to the usb internal hub when it thinks nothing is happening. This caused similar symptoms to the one you describe.
Good luck,

regards John
 

flyingnunrt

Senior Member
I struggled with a Prolific USB/serial adaptor with Win 7 (core i7 32 bit with ASUS motherb'd, no serial ports)
It worked in a random fashion with the adaptor and was very critical of power supply voltage etc. etc.
All downloads worked great with XP with a serial cable (on a P4 computer with an ASUS motherb'd with serial port)
Got an AXE027 the other day, has not missed a beat so far!
 

amewsaj

Member
Hi, I dont know anything about win7 yet, but on my xp machines, using a usb to serial converter, I had to uncheck the power setting for the internal usb chip. As default, windows turns off power to the usb internal hub when it thinks nothing is happening. This caused similar symptoms to the one you describe.
Good luck,

regards John
Thank you for the suggestion, although it didn't work...
 

inglewoodpete

Senior Member
My suggestions for this type of problem.

1. Do you have a 100nF capacitor mounted as close as possible to the power pins (legs) of the 18X?

2. As suggested by hippy, try powering the PICAXE with 3 x fresh AA cells (alkaline)

3. Using a variable power supply for the PICAXE, try programming it with the supply set at various voltages between 4.5 and 5.0 volts.

4. Use an AXE027 programming lead. I have found this to be solution to most of the world's problems (The PICAXE world, that is :)).

5. If you are using the AXE027 USB-to-serial lead from Rev-Ed AND ONLY IF using that specific lead, then you could try temporarily bypassing the 22k resistor in the download circuit. Reason: the AXE027 outputs TTL voltage levels, not RS232 like most others. NEVER try this with any other programming lead: you will damage the chip.
 
Last edited:

Tricky Dicky

Senior Member
My students have also got the same error message, in their case it has usually been a connection problem on the PCB with the serial out connection. The usual cause being the short pins on the jack socket not protruding enough through the PCB and then not getting soldered correctly.

Richard
 

hippy

Ex-Staff (retired)
The usual cause being the short pins on the jack socket not protruding enough through the PCB and then not getting soldered correctly.
If there is a loose or dodgy connection that can cause a lot of confusion; just moving a cable or board from one PC to another fixes and breaks things, makes it look like it's a PC at fault when it's a connection problem.

Those can be hard to track down as I found when moving a cable from one place to another and just a small move put a different amount of tension on a connector, enough for it not to keep good contact.
 

amewsaj

Member
inglewoodpete:
1. No, I don't have more 100 nF capacitors available - never been a problem though.
2. Did.
3. Don't have any :/
4. I will
5. Thanks for info.

Tricky Dicky:
Well, never been a problem before, and I even checked all connections by hand (measuring proper contact). I doubt this is the problem.

hippy:
Sounds likely, but still I tried moving it from one pc to the other like 20 times, and always the same result. I don't think this is the issue.

--

I have now ordered AXE027 - and a couple of 100 nF capacitors, so let's hope it will fix the problem.
 

inglewoodpete

Senior Member
Using a 6 V power supply with voltage regulator, input to chip is 5V.
I just noticed this in one of your earlier posts. A 1 volt drop across a regulator is very low. Are you using a low-dropout regulator?

If you are using a 7805 regulator, be aware that it cannot regulate reliably with such a small margin.
 

amewsaj

Member
It is has been quite some time since I built the circuit, but I believe it was just a 7805. I have never had any issues with it, but what input voltage would you recommend? Higher voltage = more heat on the regulator.... That's why I chose 6 V.
 

inglewoodpete

Senior Member
The Fairchild datasheet LM7805 states a Vdrop or dropout voltage of 2 volts. Note that this is for a full 1 amp load.

Heat should not be a problem unless you are drawing more than a few hundred milliamps. I often use a 7805 with no heatsink in PICAXE circuits with a 12v input to the regulator.
 

Technical

Technical Support
Staff member
From practical experince a 7805 generally requires about 7.2V or more for reliable operation. Low dropout regulators require less.
 

amewsaj

Member
Ok, in this circuit I can use higher input voltage, but I earlier had a different project drawing quite a lot, and I almost burned my finger on the voltage regulator...

Anyway, I tried programming the chip on a PICAXE prototype board with 3 unused batteries. Same result... So even though there might be room for improvement on my circuit, I doubt it will fix the problem...
The AXE027 has already been dispatched, now I just hope it fixes the issue...
 

amewsaj

Member
One more thing that seems to confirm that circuit and voltage is ok.
I tried now from XP Mode, and the chip is programmed with no issues.
Retrying from outside XP Mode, fails...

But actually now it only failes like 50% of the time, but still...
 

eggie

Member
In had this same problem previously. 08M could only be programmed on xp machine and not on a windows 7. However 40x2 would programme on both. In end gave up. Subquently changed my virus protection software from Mcafee to AVG and everything worked perfectly. Recently AVG have issued a new version and so installed that - but now the 08M will not programme on the windows 7 computer. :(
 

amewsaj

Member
Ehm.... :eek:
I got the AXE027, and was about to install it, and noticed that there were significantly newer drivers available for USB010 than the one I've used. I tried upgrading and ehm.... seems to work.... :rolleyes:

Anyway, the AXE027 cable works as well...

So I probably wasted some money here, but the good thing is that it is now working again...

Thanks for your time...
 

alistairsam

Senior Member
Hi,
I'm getting the memory verification error when programming two 20x2's.
I'm using a 9v battery with a 7805.
batt was a bit low, around 8.2v, voltage to picaxe around 4.5v.
i'm using a prolific usb to serial adapter from windows xp and the latest programming editor.

i'll try using a new battery but strange thing is that in the current state, 1 chip out of 3 always succeeds, whereas one never does, the other one is working 50% of the time.
but it succeeds with the "check Firmware" on all 3 chips.

i'm not using the axe027, but a pcb that I made. it worked fine before. no changes.
 

Andrew Cowan

Senior Member
If a 9v battery is reading 8.2v no load, it will be falling significantly with just a very low load (such as a PICAXE mid-program).

I'd bet 10p that your problem is the 9v battery (assuming everything is wired correctly).

Andrew
 

alistairsam

Senior Member
thanks. i thought so too, will change the battery.

but will there be a difference in power draw with the "check firmware" in options which works fine, and programming?

I'm guessing low voltage (/current) might be the issue during eeprom erase and write operations compared to read. not sure though.

slightly different question, when comparing a 9v battery and a 7805 power supply against 3 x aa batteries, which would generally last longer with the picaxe?
i think the 9v battery is around 450mAh, don't know what the AA battery ratings are.
 

hippy

Ex-Staff (retired)
You're right on current loading; Firmware Check is low-cost in current, can return a result in most cases whereas erasing or programming Eeprom or Flash draws more significant current, and that current will 'burst' throughout the download. Hence why failures with low batteries may be seen midway through a download.

For current capacities, AA batteries ( even AAA ) will exceed 9V PP3. Rechargeable 9V are often quite low, 100's of mAh, whereas AA can be 2500mAh, perhaps more these days.

One rule of thumb, though not perfect, is divide mAh by current draw = lifetime in hours. So say a PICAXE and LED draws 10mA, a 500mAh PP3 will last at most 50 hours, a 2500mAh AA perhaps 250 hours.
 

alistairsam

Senior Member
thanks.
if i'm using rechargeable AA's, do I need to use 4 instead of 3 as they're rated at 1.2v?

didn't want to start a thread just for this, but is it possible to display voltage on the power rail using a picaxe and serLCD?

i'm using a 4DGL serial display which consumes significant power, thought it'd be handy to display battery voltage at the bottom.
i'm using a 20x2. can I connect the power supply to an ADC pin ?
 

hippy

Ex-Staff (retired)
4 x AA or 3 x AA ... Depends on what they actually charge to. If maximum charged voltage of the set is less than 5.5V you can use four, if above 5.5V use three. The 1.2V is best treated as nominal, use a meter to check what they are at if a datasheet isn't available.

I've had camcorder battery packs which have charged to well above what would be expected and what they are stated as.
 

john2051

New Member
Hi again,
Is there any way to rule out a rs232 port fault?, or has this been done I just wondered, because you mention you changed your motherboard.
I hope you get to the bottom of this...
Regards John
 

rgooge

Member
If any part of your circuit is connected to a power supply or other mains powered device this could be a problem as the earth potentials between these devices and the computer (especially laptops) can vary quite significantly. This then causes voltages on the programming cable to be referenced wildly and hence behave a little unpredictably. Try running a lead from the negative supply on your Picaxe project to the frame of your PC. I have had similar problems in the past, and this is sometimes the cure.

If you're running purely from battery power and the only external connection is the programming PC then this shouldn't be an issue.
 

alistairsam

Senior Member
Hi,

I've tried a brand new 9v battery and the 7805, and i can program 2 of the 3 20x2's.
I have 3 IC sockets and can program any one, have tried the 20x2 on all three with no luck. same memory error.
i can program the other two normally.
i have not connected the one thats not working to any other circuit or used it anywhere where there is potential for damage.
I also tried a 5 v mains adaptor, measured the voltage with load, its 5.2v, checked it with an oscilloscope, no ripples.
it doesnt work with this supply either.

i have also tried with a serial to stereo cable and the stereo cable on a usb to serial adaptor.

have attached the pcb layout just for reference, but I know this is a working pcb as it has worked with the same 3 ic's for a few months on the same pcb without any problem.

i'll order a new chip but cant think of why it would respond to a firmware query but not download the program when others can in the same socket and same setup.

I also tried the clear memory option in the editor.
 

Attachments

John West

Senior Member
Yes, it may have worked for months, but it is a very borderline design and could cease working at any time under even minutely different operating conditions, as it appears it has.

If you included a schematic among your posts I must have missed it. However, I carefully reviewed your bd layout and identified only a single capacitor in the entire circuit, and I'm guessing it's not a bulk electrolytic type, as I see no polarity mark on the silkscreen.

If you have only one low value capacitor to filter and stabilize this entire circuit (a 7805, three 20X2's and an EEPROM,) I'm surprised it works at all. EEPROM's especially exhibit pulse currents during programming that require proper filtration. Capacitors - the right capacitors in the right places - are essential in nearly all electronic circuits.

Under-filtered circuits, like this one, are famous for being erratic and unreliable, like this one, producing a range of different failure modes from test to test.

It appears I'm becoming the forum capacitor whiner, but if you'd shown this circuit three pages of posts ago, someone else would likely have pointed out the problem at the start. I'm just the first guy here to see the circuit design.

Review the power supply filtration requirements listed in Manual 1 for each picaxe chip, then look up the data-sheet for the 7805 and follow its capacitor filter suggestions. Then look up the cap filtration requirements in the EEPROM data-sheet and implement them as well. Then try your circuit again. I think your problem will disappear.

-
Far too many picaxe hobbyists are getting into consistency and reliability difficulties from leaving required capacitors out of their designs. I'm not sure why. Maybe they simply don't understand that what works on the breadboard or under certain conditions may not continue to work under any other conditions. Perhaps Manual 1 needs to more strongly emphasize the necessity of their use.
 
Last edited:

alistairsam

Senior Member
Thanks John,

I hadn't looked at that section in manual 1, but I soldered a 100mfd cap under the board as i'd omitted that from the pcb design by mistake and tested.

I agree with the importance of decoupling capacitors and filter capacitors.
will add them, test and post results.

but you mentioned to review filtration requirement for each picaxe.
as per the manual, its a 100n and 100mfd at the output of the 7805.
if i have three on the same power rail, do i use 330n and 220mfd capacitors?
with higher value electrolytic capacitors wouldnt there be a voltage increase?
 
Top