smd picaxe 40x2 do not accept program

yurif74

New Member
Hello people,
Need serious help here :(
i built a project with a dip picaxe 40x2 on breadboard and all was working correctly.
So maked the pcb and used a picaxe 40x2 smd (5v version)
When i uploaded the program i had an error like bad connection on transer cable /interface
The interface is built on pcb. I carefully checked the circuit and it is correct.
In the config menu i tried check connection and it worked, it reported 20x2 (40x2).
But when i upload the program i get an error. Why?
What's wrong?
The 40x2 is clocked with an external 16mhz resonator.
And first line of program is "setclock em16"
The upload window appear for about 2-3 seconds but the bar do not move, and then the error appear
Could someone help me please?
Thank you very much!
Juri
 

westaust55

Moderator
Not sure this will solve your programme download problem but

If you have a 16 MHz external resonator, the X2 parts have an internal 4 x PLL so the clock is actually 16 x 4 = 64 MHz.
Even if you use SETFREQ em16 it will still operate at 64 MHz.

Irrespective of the first line command it could be that the 40X2 is running at 64 MHz and cannot recognize a new download.
Try a "Hard Reset" - either turn off the power or hold the reset button down while starting a new download. Only once the download window has appeared turn on the X2 power or release the reset button.
 

yurif74

New Member
Thanks for the tip, i forgot the about the x4 pll so i will revert to a 8mhz resonator.
However the "setfreq" manual report that on x2 part the clock is reverted to internal 4mhz/8mhz clock generator for download operation, so it should work even my wrong setfreq em16.
I tried to remove the command (to let picaxe use its internal clock generator) but without any effects
I'm still getting the error.
 

hippy

Technical Support
Staff member
I'm still getting the error.
If you could report exactly what the error is that will help diagnose the problem. Perhaps also post a circuit diagram, tracking of the PCB, photos of the board it may help identify what the problem is.

Check there are no shorts or solder splashes between the pins as this can cause verification and other errors. Also check the power supply.
 

yurif74

New Member
Hello thanks for help,
this morning i prepared all for a good photo shoot, i know this would take long time, so first i checked with usb microscope if there was some blob on the pins, and it looked nicely clear, next since the pcb was already on my workbench i decided to remove the cheap 16mhz resonator with a Murata 8mhz one because the manual report that only the 40x2 3v version can run at 64mhz, the 5v is max 40mhz. i placed the correct "setfreq em32" and..... BINGO!
now it's perfectly working! :) i tried a "hard reset" too after replacing the resonator, but im almost sure the problem was the overclocked picaxe ;)
thanks to all
 

hippy

Technical Support
Staff member
im almost sure the problem was the overclocked picaxe ;)
That would seem unlikely given, as you noted, the PICAXE uses its internal oscillator when it starts and when it downloads. A SETFREQ command in the program will have no effect until after the program has been downloaded and would not affect the download.

It is not clear what "40X2" you have, whether a universal voltage 40X2, a 40X2-5V or 40X2-3V. If you could let us know what is silk-screened on the chip as a label we can identify exactly what it is.
 

Janne

Senior Member
Hello thanks for help,
this morning i prepared all for a good photo shoot, i know this would take long time, so first i checked with usb microscope if there was some blob on the pins, and it looked nicely clear, next since the pcb was already on my workbench i decided to remove the cheap 16mhz resonator with a Murata 8mhz one because the manual report that only the 40x2 3v version can run at 64mhz, the 5v is max 40mhz. i placed the correct "setfreq em32" and..... BINGO!
now it's perfectly working! :) i tried a "hard reset" too after replacing the resonator, but im almost sure the problem was the overclocked picaxe ;)
thanks to all
Based on the remedy, I suspect the real problem is a dodgy connection in one of the pins. Prodding around the board heated / shifted one of the pins or pads and cured it.. for now only to appear again later on.
 

yurif74

New Member
Hello again.
picaxe is PIC18FK22, looking at the datasheet it should work @64mhz.
since i do not need such firepower i have leaved the 8mhz resonator.
Janne could be right, one pin of the resonator is near pin23 of the picaxe.
i used flux technique to solder the picaxe and all other smd chips i usually use, never had a poroblem however "there is always a first time"
i checked trough all (used) pins of picaxe and appear to have nicely clear soldering, however the words "..for now only to appear again later on" scared me a little bit so i resoldered pin 23 and pin 24, just better safe than sorry :)
 
Top