Werid problem

tegwin

New Member
I have build a basic circuit using a 28X1 connected to an LED via 330R resistor....

Using picaxe programming editor I have writen a simple "on, wait, off" program that is suposed to switch all pins on and off, just to see if it all works ok...

The program downloads fine using the latest version of picaxe editor, but once its downloaded to the chip the outputs dont turn on and off....Im sure the ciruit is correct having checked it and checked it again...

So what am I doing wrong?

Why is the IC not running the program?

(Im using a picaxe usb cable)

PC is deffinately connecting with the IC because it can detect that the 28X1 chip is plugged in and tells me this on screen...
 
Last edited:

BeanieBots

Moderator
If the program downloads OK, then most of your circuit must be OK.
Try something easy like:-

main:
high 0
pause 500
low 0
pause 500
goto main

and then check that output 0 (leg 21) is changing state.
It's going to be something very simple!
 

alpacaman

Member
None of the programs I've ever written seem to work until I turn the power off, unplug the programming cable, and power back up again. Then every thing works fine. I have found no documantation that this needs to be done.
 

tegwin

New Member
Will someone please shoot me....

I had got the input and output pins switched over, so had the LED plugged into an input...no wonder it wouldnt work...

Sorry...

It seems to be working just fine now :)
 
Last edited:

BeanieBots

Moderator
None of the programs I've ever written seem to work until I turn the power off, unplug the programming cable, and power back up again. Then every thing works fine. I have found no documantation that this needs to be done.
You shouldn't need to do that.
You clearly have a circuit/power problem.
Double check the download circuit and reset connections.
Try with batteries to eliminate any power supply problems.
 

boriz

Senior Member
@tegwin
We all make silly mistakes. Thank you for posting your solution instead of just saying ‘fixed it, thanks’. This information may prove useful to someone.
 

alpacaman

Member
You shouldn't need to do that.
You clearly have a circuit/power problem.
Double check the download circuit and reset connections.
Try with batteries to eliminate any power supply problems.
I've now built several projects using the 08M and 18X. These include: electronic wind chimes, binary clock, bank/coin counter, and a clock which uses 2 r/c servos. They have been running continuosly, except for the annoying wind chimes, since built and the clocks keep time and the bank keeps it's LCD display and keeps an accurate coin count. That would tell me that the power supplies are ok - more so with the clock using the servos. I've used power supplies using a 7805 and batteries. I have a .1 mfd cap across the power pins of the PICAXE chips.

I haven't had any problems with programming the chips. I'm using the circuit out of the manual with the stereo plug and I bought the cable.

Unplugging the programming cable to test and run the program is a pain, but since everything else seems to work ok I haven't worried too much about it.
 

BeanieBots

Moderator
All I can say is "something" is wrong with your circuit or power supply.
It will be a very simple "silly" that's been overlooked.
There are countless thousands of PICAXE circuits out there that don't have that problem!
Double check that your download circuit is NOT a potential divider.
Double check that reset (if applicable) is held high.
Double check no unused inputs are floating. (not REQUIRED but does help).
Check you have 100nF decoupling on the power rail.
Check that power is actually on the power pins and that the chip is not being powered via an input or other parasitic supply.
 

alpacaman

Member
All I can say is "something" is wrong with your circuit or power supply.
It will be a very simple "silly" that's been overlooked.
There are countless thousands of PICAXE circuits out there that don't have that problem!
Double check that your download circuit is NOT a potential divider.
Double check that reset (if applicable) is held high.
Double check no unused inputs are floating. (not REQUIRED but does help).
Check you have 100nF decoupling on the power rail.
Check that power is actually on the power pins and that the chip is not being powered via an input or other parasitic supply.
To make sure it's not me I did a simple "blink the LED" using the project board by Rev Ed. So I know that the programming circuit, and all the other circuitry, is correct. I used 3 1.5 volt batteries to power it. The program still would not run until I unplugged the programming cable.

Is there a setting in the editing software or on my PC, that I'm not aware of? I'm using the latest and greatest editor program from Rev Ed.
 

Technical

Technical Support
Staff member
The only reason for this behaviour is that insertion of the cable is pulling the serial in line high, holding the chip in reset after the download has completed.

We have never heard of any computer's serial port default state 'pulling high' to the 'rs232 break condition' like this in the past - in fact it implies the computer serial port is actually damaged in some way. Have you tested your board on another computer?
 

BeanieBots

Moderator
There is no setting. What you are experiencing is simply WRONG.
It has to be a wiring error or possibly a faulty chip.
I've never had that issue myself with any of the PICAXE family.
Is it repeatable with other chips?

What is the PICAXE firmware version and your editor version?
Can you draw the COMPLETE circuit diagram? That is, absolutely everything you have connected to every single pin. Especially serin and reset (where applicable). Actually measure the resistor values.
 

alpacaman

Member
There is no setting. What you are experiencing is simply WRONG.
It has to be a wiring error or possibly a faulty chip.
I've never had that issue myself with any of the PICAXE family.
Is it repeatable with other chips?

What is the PICAXE firmware version and your editor version?
Can you draw the COMPLETE circuit diagram? That is, absolutely everything you have connected to every single pin. Especially serin and reset (where applicable). Actually measure the resistor values.
I believe you when you say it's wrong - and thanks for trying to help. I've attached 2 files - one using an 08M and one using 18X. Both are using power supplies but I get the same thing using batteries. Although these don't show capacitors across the power lines on the chips I have tried that also with no difference. Again, it acts the same using the developer board by Rev Ed with batteries. I've built several projects, each using a new chip, each acting the same way. If its me, and I'm not saying it's not, at least I'm consistent.

The firmware version I'm using is 5.0.7.

Technical suggested that it could be the serial port on my PC. I tried another PC last night with no difference.

Although I would like it to work like it should, I'm not too worried about it since I haven't had any problems programming the chips.
 
Last edited:

Technical

Technical Support
Staff member
Again, it acts the same using the developer board by Rev Ed with batteries. I've built several projects, each using a new chip, each acting the same way.
Have you also tried a different cable? A wiring fault in the cable itself should maen the download fails aswell, but it is worth a shot as everything else seems to have been tested!
 

alpacaman

Member
The only reason for this behaviour is that insertion of the cable is pulling the serial in line high, holding the chip in reset after the download has completed.

We have never heard of any computer's serial port default state 'pulling high' to the 'rs232 break condition' like this in the past - in fact it implies the computer serial port is actually damaged in some way. Have you tested your board on another computer?
When I plug the programming cable into the computer, with the other end unplugged, and measure the voltage across the common and serial-in - 5.84 volts. I added a 10k resistor across these pins, like it is in the programming circuit, and it dropped the voltage about 0.10 volts.

I haven't tried a new cable. I bought the one I'm using from Rev Ed and since I haven't had any programming problems I haven't considered the cable.
 
Top