08M strange power up

captnemo

New Member
I'm running this simple program on an 08M.
Main:
high 4
high 2
wait 3
low 2
wait 3
low 4
end
I'm assuming that on "power up" the 08M starts running it's program immediately, yet it take eight or nine seconds to start running. Am I missing something in the program. I've worked with 08M's before and never noticed this delay.
 

inglewoodpete

Senior Member
My first thought is: Do you have the 22k + 10k Serin download resistors in place? They must always remain connected when downloading or running.
 

captnemo

New Member
The 08m is programmed on a programmer I built and then moved to a bread board. No I don't have the 22k or 10k connected. I will do so.
Thanks. I'll have to remember that one.
 

steliosm

Senior Member
If you are not going to program the 08m2 on the breadboard you can use only the 10K pull down on the SerIn pin.
 

AllyCat

Senior Member
Hi,

Yes, the value of the resistor is not at all critical, the only requirement is that there MUST be a PULL-DOWN on the Serial "Programming" Input pin (so that it is read as a 0 at power-on). It can be safely even zero ohms (i.e. a link) to ground (because it is an "Input Only" pin), but I would NEVER recommend this for a finished PCB or project. Personally, I suggest around 100k ohms, because then you can "clip on" a normal programming cable (with the two resistors connected externally) should the need arise.
The 08m is programmed on a programmer I built and then moved to a bread board. No I don't have the 22k or 10k connected.
What is so often overlooked is that it's not just a "Programming" interface, it's a DEBUGGING interface, which can be particularly useful even for a "finished" project. For example, make the first line of the Program SERTXD("{Filename} : {Version} : {Date}",cr,lf) , or I often measure the supply voltage (no I/O pins required with CALIBADC10) and report that to the SerOut pin each time power is applied. With PE6 the Program data even can be inserted "automatically" by using the Preprocessor Contants for example : SERTXD ( ppp_filename ," : ", ppp_date , CR,LF )

Cheers, Alan.
 

captnemo

New Member
If the resistors are not there, what exactly is the picaxe doing when first turned on? It seems to run the program after several seconds. Is it waiting for a time out, on the serial port, if no data on the serial port appears?
 

steliosm

Senior Member
Well, the chip is actually checking on serial in pin for a signal in order to switch between 'programming' and 'running' mode. As this pin is floating, the chip switches from 'running' to 'programming' and vice versa. Some times, the pin will settle to 'low', so the chip switches to 'running' mode and actually execute your code, until the pin decides to move to 'high' and switch the mode again.
 

AllyCat

Senior Member
Hi,

The problem with a "floating" input is that the PICaxe's behaviour is "unpredictable". If the pin happens to read as "Low" (less than about 1.5 volts relative to Ground) then the PICaxe will start-up completely normally. This is why there are often posts from members saying that their program had worked perfectly and then suddenly stopped working for no apparent reason. Conversely, AFAIK if the pin remains "High" then the PICaxe will NEVER start, because it is waiting to receive a new Program download. It appears that in your case, the pin is starting High and then falls to Low after some seconds, which actually is not particularly surprising:

Any PICaxe I/O pin has a "stray" capacitance of some picoFarads to Ground and also to at least its adjacent pins. Leg 1 is the supply rail so when power is applied to the PICaxe, it is quite possible that stray capacitance or resistance will also pull Leg 2 (the serial Input) towards the supply voltage. Then the PCB tracks and/or any connected cables can add more stray couplings (Capacitive and/or "Resistive"), for example from the Serial Output and Ground connections.

The problem is that to change the voltage across a few pF in a few seconds needs only PicoAmps (i.e. millionths of a uA), which can flow in a "resistance" of millions of MegOhms. There also may be thermal leakage currents within the PICaxe chip itself, and furthermore when the PICaxe starts up it may drive the serial Output pin Low and/or apply a "handshake" signal to indicate that it is waiting for a new Program download.

Hence it is essential that the Serial Programming pin is normally held Low (usually a "High" can be used as a "Hardware Reset" input if required), but even my 100k (to ground) is quite conservative, it's probable that 1M ohms or even 10M or 100M may be sufficient in most applications.

Cheers, Alan
 

Willie...

New Member
In a project I made years ago (a very simple countdown timer with an 08M chip) I used the Serial programming pin as a hardware RESET with a button. 10K resistor to Gnd, and when the button was pressed, pulled to +5v. It worked perfectly.
 
Top