Problems with picaxe 08m2

I changed an older program for a 08m to use it on a 08m2 by changing the notation of the used pins.
Old version was:
symbol led = 1
symbol taster = pin3
button 3,1,0,0,b3,1,<address>
New version is:
symbol led = C.1
symbol taster = pinC.3
button C.3,1,0,0,b3,1,<address>

Downloading the new program to a 08m it works very well. Downloading it to a 08m2 (using the same hardware) it doesn’t work. The correct program flow after connecting the battery should be the following:
1. Set servo signal to 96,
2. led blinking 5 times,
3. led constant on and waiting for input via push-button.

Using a 08m2 the led is blinking in an endless loop and the servo shortly jitters in the frequency of blinking. What could be the reason???
 

Attachments

hippy

Technical Support
Staff member
The correct program flow after connecting the battery should be the following:
1. Set servo signal to 96,
2. led blinking 5 times,
3. led constant on and waiting for input via push-button.
That's what your program did for me when I downloaded it to an 08M2; did not test servo but LED behaves as expected.

Are you using the same hardware to test 08M2 and 08M or different hardware ?
 

Armp

Senior Member
Standard answer #1 - try adding a decoupling cap to your board.
The M2s are faster, generate more switching noise
 

Goeytex

Senior Member
And..... A bulk/Filter capacitor on the board may be helpful, especially if the power leads are over 10 inches in length or if the power supply is not a battery. 100uf / 25v will work ok.
 

Armp

Senior Member
Thank you for your answers. I followed your tips and it works :)
Glad it worked for you..

IMO the newer generation of PICAXEs should never be used without decoupling.
Good practice would be 100nF at the PICAXE pins, maybe 50uF on the board, and more if servos or motors are involved.
 

Grogster

Senior Member
Glad it worked for you..

IMO the newer generation of PICAXEs should never be used without decoupling.
Good practice would be 100nF at the PICAXE pins, maybe 50uF on the board, and more if servos or motors are involved.
TOTALLY agree. I put at least 100nF caps right beside the power pin of any PICAXE and GND, as you say...
 
Top