error with 20x2

radiofan

New Member
Hi.....

I have been trying to program a 20x2 for several days now . I always get some sort of error. The most common is is "error on port 1" . I have tried several chips and they are all the same. The program gets thru the syntax check just fine. I can program 08m2 chips just fine. The editor does recognize the chip as a 20x2 when checked. The program is not mine as I am building a project that uses it. Other folks have used it with no problem. I ran all the diagnostics on the axe027 cable and all checks out. My programer has just the four connections as speced in the manual. Any help is welcome.
 

inglewoodpete

Senior Member
Welcome to the PICAXE forum.

My first thought was: "What is the source of the chip?" While a PICAXE 20X2 carries Microchip's "PIC18F14K22" marking, it has a specially loaded operating system. As far as I know, the only business that loads the PICAXE firmware onto these chips is Revolution Education in the UK, owners of this website. There are resellers around the world, refer to the list here.
 

Flenser

Senior Member
radiofan,

If you can program 08M2 chips then there is nothing wrong with your axe027 cable.

You said "The editor does recognize the chip as a 20x2 when checked." Do you mean that when you use the "Check PICAXE type connected" link it reports a 20X2 chip?

You said that the most common error you are seeing is "error on port 1". I've never seen this error and a search of the forum for it does not return any other hits. Can you post a screen print of the dialog box showing the error?

What are the other error messages that you are getting with the 20X2?
 
Last edited:

hippy

Technical Support
Staff member
If the error is "Hardware not found" then it may be that you need to use the Hard Reset procedure to reprogram the 20X2 because something in the program you have previously downloaded prevents the new download initiation being seen.
 

radiofan

New Member
I am now getting hardware not found error. I have tried a second programmer cable with the same result. I have had success in the editor with the erase command. It says that the program was downloaded . The program button gives the error 1. Is there a problem with the editor program. I have it on three computer and I get the same result on all. I have not tried a test program yet. I may have time in the next day or two. I have my project nearly complete so I have no way of seeing if the chip is actually programmed or not. I did try the hard reset but with no result. Like I said the erase or clear button seems to be working with success. I'll keep trying. I wish there was more info on how to use the editor with more explanations of it's features. I got these chips from P.H. Anderson In the USA. I'll have to get some screen captures.
 

hippy

Technical Support
Staff member
What project board do you have your PICAXE on or how is it wired and connected ?

I still suspect it's a Hard Reset issue. To perform that -

Disconnect power from the PICAXE board
Wait a second or two
Initiate the download
About a second or two later, re-connect power to the PICAXE board.

You might have to try that a few times to get familiar with the timing.

If you select the "compiler" tab at the bottom of the Workspace Explorer window ( usually at upper left in PE6 ), that will show "Connect power now! Searching for hardware on COMx" when power should be connected after a download initiation.
 

inglewoodpete

Senior Member
If you select the "compiler" tab at the bottom of the Workspace Explorer window ( usually at upper left in PE6 ), that will show "Connect power now! Searching for hardware on COMx" when power should be connected after a download initiation.
Further to hippy's suggestion, confirm that the serial port "COMx" is the correct one (Eg, on my computer it says "COM5 AXE027 PICAXE USB" in Workspace Explorer>Settings)

If you have a logic probe, you can check the logic levels on the Serial In pi (Normally low, pulls high on download attempt) and Serial Out pin (Normally low, pulses high during download attempt)of the chip when a download attempt is made.
 

marks

Senior Member
Hi radiofan,
When having programming problems
the first thing to do is check what picaxe device is connected
and confirm you are connected to the correct port
like you have done !

You may for example see
Error: Hardware not found on Com 5!
refresh Com ports
and reselect the correct serial port, if your axe027 is on a different port.
Because you have already comfirmed the 20x2 firmware this should be ok!

So perhaps recheck all connections especially if breadboarded.

programming requires a little more grunt!
If your supply is more than six inches away
your picaxe device will usually require its own decoupling.
for most projects I just use a 0.1uf and 47uf tant close to the picaxe supply pins
this ensures reliability. you can the safely rule this out of being a problem.

next try the hard reset as already mentioned.
 

kfjl

Member
Hi radiofan,

I would dump: "The program",
even if: "Other folks have used it with no problem."

Some commands leave a Picaxe in a state where uploading is impossible without a hard reset.

Why not post the code you're trying to use?

And get an LED to blink with a 20X2 before trying anything more ambitious.
 

AllyCat

Senior Member
Hi,

+1. Yes, exactly what I was going to suggest.

Or you don't even need to connect a LED. Just a simple test with the Terminal Emulator in the PE should be good enough (and can also be checked in the simulator). For example:
Code:
#picaxe 20x2
#no_data
#terminal 9600           ; 4800 for M2 parts at 4 MHz
sertxd("Hello World")
stop
As suggested previously, you may well need to use the Hard Reset procedure to download that (or any) program.

Cheers, Alan.
 
Top