problem with downloading the program onto the picaxe

#1
Hello, this is my first time trying to do a robot using a picaxe microcontroller and I keep geting the "hardware not found on com 4" error.
I am using a PICAXE 28x1.

I have searched the forums and tried quite a few things.

So I ended up testing my COM download cable to see if it works. Hooked up Rx to Tx and checked in the terminal to see if i receive what I send. That worked just fine.

I have tested the COM port again using the test port option in PE. And again worked just fine. Also PE sees my com port as Prolific USB to Serial COM port as I am using an adaptor.

I figured maybe this type of download cable might not work on my pc so I tryed making a new one using a MAX 232 like in the data sheet like in manual 3 page 44 (http://www.rev-ed.co.uk/docs/picaxe_manual3.pdf).
But I still get the same problem.

I have read somewhere that there might be a problem and the cable will not work if i do not have a 5Volts power supply so I ended up checking that as well and it is aprox 5V( using 3 x 1.5 AA batteries).

I am simply out of ideas.
Any chance you might have an ideea about what’s going on?
My last thought is maybe the microcontroller got damaged when it got mailed to me. Anyway i can test if it's working?

Waiting for an answer, Thank you.

aciidentally double posted :(
 

Attachments

Last edited:

SAborn

Senior Member
#2
Your photo is so blury i can not see what resistors you have where.
On your schematic i am unsure if it shows a 10K or 40K resistor on the serial in.

Are you sure you have wired the adaptor correctly to the D9 socket as it is easy to get this wrong. it should be serial out to pin 2, serial in to pin3, and ground to pin 5 of the D9 socket

Have you tried a hard reset, leave the power to the board off, start the download then quickly turn the power on to the board.
 

Attachments

#3
Yeah, I am very sorry for the blury picture, will try to take a new one today.

serial in has a 10k resistor, kinda shows like 40 cause of the + in eagle.

Just checked my DB9 socket and yes i wired it correctly.

Also tried the hard reset like you suggested but I am still having the same problem as before.

I am unsure about the button tho, gonna check if i wired it correctly today.

I tried on a laptop today and i got the same problem.


Should i try connecting it to a direct serial port on my pc? I checked and i have a COM on my motherboard, just need to buy one of those old serial - idc 10 cables.
 
#4
Another test that you can do is to remove the PICAXE chip from it's socket, and do the PE's "port test" again. You should read the correct voltages at the serial in pin hole (6) of the socket. It should normally be around 0v (or negative) and go positive (5 to 12v) when you click on the button.

From my experience, in he many hundreds of chips that I have received in the mail, I have never received a dud.

FYI, (but don't try it!) the 28x1 can survive being plugged in the wrong way around. Just don't ask how I know:rolleyes:
 
#5
In your schematic you have a resistor on the 'serout' pin (R2), I can't make out the value, but try removing this resistor and just have the chips serout (pin7) going directly to your COMpin header.
In Manual 2, page 8, the basic download circuit doesn't show this resistor. I think it may be dropping the picaxe serout voltage level and the PE is not getting the info back from the chip to let it know it's there.
Worth a try..
 
#6
In Manual 2, page 8, the basic download circuit doesn't show this resistor. I think it may be dropping the picaxe serout voltage level and the PE is not getting the info back from the chip to let it know it's there.
However, the enhanced download circuit (Manual 1) does. Recommended when not using the AXE027, in particular when doing Debug (or SerTxd) and ADC reading at the same time.
 

SAborn

Senior Member
#7
Ok you have checked the D9 socket, have you now checked the 3 pin header socket to be correct in the wiring.

Its a simple mistake i and many have made to get some pins reversed.
It happens when we look at the front view and then go to the back view of a socket.

Do a ohms test from the pins on the board to the back of the D9 and check all is correct.

What is the usb to serial cable you have, perhaps a photo of the cable could help.

There has been times i thought i had a dud chip, but it has always been the dud operator at fault, and have never received a dud in around 1000 chips.
 

Goeytex

Senior Member
#8
Try this,

Make sure that everything is powered up and connected.

Measure the voltage between Pins 19 & 20 (directly on the Picaxe Pins) to make sure you have good voltage at the chip.

Measure the voltage between Pin 1 and Ground. The voltage should be at 5v. Then press the reset switch. The voltage should go to zero volts. If this is reversed then the Picaxe is constantly reset and cannot be programmed.


In the Program Editor click on OPTIONS > Serial Port & then put a check in "Show Port Help Tools" Make sure the Prolific Port selected. Then click on "Test Port" Follow the instructions in the window exactly.

The voltage on the 28x1 serial input ( Pin 6) should be between -.5v and 0v when the LED is off. When you click on the LED and it turns bright green the voltage should switch "high".

Make note of the voltages during the test and report back with your actual readings. . .

NOW .... do the test with the meter positive lead connected at the junction
of the 22K and 10K resistors. When the LED is off you should be reading
somewhere around - 9 to - 10v . When you click on the LED the voltage should go somewhere above 6 volts. If you are not getting a high negative voltage ( - 8 to - 10) when the LED is off, then your adapter cable may not be a USB to RS-232 but instead a USB to Serial TTL.

Please provide the Manufacturer and Model # of the cable. Prolific chips are used by many different manufacturers,
some good and some not so good.

Put your camera in Macro Mode and take a sharply focused photo of your PCB so that everyone can see all the connections, traces & components clearly.

Goeytex
 
Last edited:
#9
Hello and thank you all for your answers.

Was at work today with the robot and was trying to make a new PCB.

But as I left the PCB in the Ferry Chloride I got a bit bored so decided to find one of our very old PC (10 or so years ago) with a direct Serial Port.


After I installed PE and checked the port and everything I managed to download my program onto the picaxe. Then I tried through the USB-to-Serial adaptor and was getting the hardware not found error. It seems that even tho I had installed the virtual COM (and the pc was recognizing it), it didn't recognise my picaxe.

So never gonna use an adaptor again, bought myself one of those serial - idc cables and tested it as well at home and now it works just fine :)

Thank you all for the help, I really appreciate it.


PS my adaptor was this: http://www.dealextreme.com/p/usb-to-rs232-serial-port-adapter-transparent-green-24512, only it's not so cheep here in my country :)
 

srnet

Senior Member
#10
I have bought USB to serial adapters off eBay for £1.50 and they have worked for both PICAXE and the DS30 bootloader.

But then if they did not, I would not be that surprised.
 
#11
Looking at the board track layout you have the 4k7 resistor on the wrong side of the reset switch.

The Reset pin should always be held high by the resistor and the switch pulls the pin momentarily to 0V for RESET action.
 

Goeytex

Senior Member
#12
So never gonna use an adaptor again, bought myself one of those serial - idc cables and tested it as well at home and now it works just fine :)

Thank you all for the help, I really appreciate it.


PS my adaptor was this: http://www.dealextreme.com/p/usb-to-rs232-serial-port-adapter-transparent-green-24512, only it's not so cheep here in my country :)
Your adapter was a USB to TTL with the data inverted. (IE idle high, data low). For serial download ( programming) , the serial line needs to idle low with data high. This is why you got the error message. All you probably needed to do was invert the data to and from the adapter by using a 74HC14 hex inverter (or a couple of transistors.)

A MAX232 could also be used, but you only need to use the TTL to TTL inverting pins. In other words the charge pump caps can be completely eliminated and Pins 8/9 are used as one Schmitt inverter and Pins 13/12 are used as another.

I have used both ways successfully with both CP2102 and FTDI232 based adapters. The CP2102 USB to Serial adapters cost 5 times less than the FTDI based ones and work just as well.

So the cost for the ability to program via a USB port is less than 5$ US. Vs about $30 for a USB download cable.

I would not swear off these inexpensive & useful adapters because of a misunderstanding of how the serial download circuit works.

See the circuit below. This is my current setup that works great.




Goeytex
 

Attachments

Last edited:

hippy

Technical Support
Staff member
#13
Your adapter was a USB to TTL with the data inverted. (IE idle high, data low).
Not sure that is the case here as the link shows a USB to 9-way D and described as RS232. If it's to interface to anything else 9-way D and work it should be idle low (-V/0V), active high (+V).

We recommend the AXE027 USB cable for use with PICAXE. It can save hours and days of delay and frustration of trying to get other adapters work.
 

Goeytex

Senior Member
#14
Not sure that is the case here as the link shows a USB to 9-way D and described as RS232. If it's to interface to anything else 9-way D and work it should be idle low (-V/0V), active high (+V).




We recommend the AXE027 USB cable for use with PICAXE. It can save hours and days of delay and frustration of trying to get other adapters work.
Thanks,

I certainly understand the Company Line recommendation of the AXE027. It's a great product but a bit pricey IMO.

However, the circuit I posted works perfectly well and I can assure you it only took 15 minutes to set up without any frustration. The hours of frustration come when folks get cheap knockoffs, or get stuff they don't understand how to use or adapt. Many cannot or will not read a datasheet.

In any case, I have read on the boards where some of the so called "RS232" Adapters have the RS232 Driver /Receiver chip missing and therefore only supply TTL levels if anything at all . Cheap Knockoffs . Since the original poster gave up and never gave the results of the test I suggested we will probably never know what he really had.

Goeytex
 
#17
@westaust55, or anyone who can explain the position of 4k7 resistor in a reset circuit:

The board shows the 4k7 resistor between power (+5V) and the switch

Why is the 4k7 resistor better between the reset pin (pin 1) and the switch ? Is anything to with the capacitor in ground side of the reset circuit (between ground [0V] and the switch) ?

The reset circuit I am using has the 4k7 resistor between the switch and +5V and switches pin 1 directly to 0V (no capacitor) on pushing it. Is there anything wrong with that or should I put the 4k7 resistor between pin 1 (reset) and the switch ? I am worried because I haven't yet managed to get my download circuit working yet as maybe you'll see in few days time !!

AB
23.July.2011
 
Last edited:

AllyCat

Senior Member
#20
Hi Marz,

The description states "RS232 TTL", which implies that the signals will be inverted relative to the "RS232" required by PICaxe.

Also, I can see no indication in the "features" that it implements "break signalling", which is essential for PICaxe programming.

That's not to say that it can't be made to work, but do you want to give it a try and tell us?

Cheers, Alan.
 

Goeytex

Senior Member
#21
The chip on the device reads PL2303, so it could either have a genuine or "fake" Prolific PL2303 chip. A genuine PL2303 supports break signaling, some fakes do not.

In order for this device to work with with a Picaxe, it must: (1) Support break signaling and (2) Both the RX and TX signals must be inverted. Inversion can be done in several ways.

1) Max232 type line driver IC.
2) Logic Inverter IC (74HCT14)
3) 2 Discrete Transistors.

Good Luck
 
#22
Hi
Goeytex, do you really think ten quid, or whatever it is in dollars is a lot? The hours I've spent trying to get usb to rs232 adapters to work reliably. I would sooner spend ten pounds and have a good idea that if the picaxe wont program, its probably something I've done. When you have a scenario where there are multiple problems, ie duff protoboard, bad serial cable (or incorrectly wired), or bad chip (rare). The fewer the variables, the easier it should be to sort out.
Interestingly, the usb to rs232 adapter that tech sell work very reliably, yet one from maplin that looked in everyway identical wouldnt work. Didnt the earlier PL series chip have a function similar to fdti where you could alter the polarity of tx & rx data. Years ago, I'm sure I downloaded something to do this from prolific. I suppose their newer chips no longer have this.
If you're just starting with picaxes, or any other platform for that matter, theres nothing more 'off putting' when something that should be enjoyable doesent work for whatever reason.
Imagine what it would be like if there were no helpful forums.
regards john
 

Goeytex

Senior Member
#23
Goeytex, do you really think ten quid, or whatever it is in dollars is a lot?
Not to me, but it likely is to a youngster or student or someone on a tight budget. Personally I prefer an FTDI Based adapter, either an AXE027 or other. Never had a problem with one of these. The AXE 027 is my first recommendation to those that can afford it.

HOWEVER ...... There are those on budgets where 10 quid is a lot. And then there are just plain old cheapskates whose main specification for any project is "cheap". These folks simply will not listen and are going to buy the cheapest thing they can find. And as most of us know, being cheap can sometimes cost a lot.

The fact that I offer help to folks to get these cheap adapters working should not be misconstrued to mean that I personally think that "10 quid is a lot" or that there are no "gotchas" when it come to buying and using cheap junk. But then again, I do imagine that 10 quid is a lot to someone who only has 2.
 

erco

Senior Member
#24
As I see it, the best part of these forums is learning from what others have already done to avoid reinventing the wheel. Goeytex posts a lot of amazing info derived from invaluable hands-on testing. I've learned and benefitted mightily from his posts, from USB adapters to wireless modules. I write magazine articles as well as teach & mentor kids and adults on robots, and push Picaxe as a great controller at every opportunity. Everyone knows & wants Arduino, but from my experience they'll try Picaxe if they can get into it cheaply. Getting a cheap, working, frustration-free USB adapter cable is the first order of business, and from then on it's only $3-4 for the various Picaxe chips. That's a steady revenue stream for Rev-Ed, even if they didn't sell an AXE027. More of a razors & razor blade business model.
 

erco

Senior Member
#25
FYI: I tried three new USB adapters, all which work fine to program Picaxes with Goeytex's inverter circuit. I expected the CH340 to need the inverter, but hoped the FTDI unit would work without. The CP2102 has a different form factor than my previous red 2102 board, but works identically. These links are to the exact items I tested.

$1.75 CH340: http://www.ebay.com/itm/201000826607
$4.96 FTDI: http://www.ebay.com/itm/201064757678
5 pc/$7.99 CP2102: http://www.ebay.com/itm/181433610355

The FTDI chip provides a DTR line, so it might work with other processors too.

Edit: This "Prolific USB-Serial" adapter just arrived. Under $1 and it works fine w/inverter on Windows Vista (only machine available), will advise further when I can test on Windows 8.1. http://www.ebay.com/itm/171109811185
http://www.ebay.com/itm/181334756090
 
Last edited:

erco

Senior Member
#26
I'm preparing to teach a kid's PicAxe programming & robotics class here in LA. The goal is to be solderless and use a small breadboard for everything. The attached pics & video show an 08M2 with all decoupling caps & download resistors taking just 5 rows in the breadboard, leaving 12 rows open for breadboard experiments. I also made a compact goeytex-style USB adapter (CP2102+74HC14 inverter) which has a polarized 3-pin header to connect to the breadboard. I'll have to make one of those for each kid, about $2 in parts. Three of the USB output pins (+5V,Rx and Tx) line up perfectly with the 74HC145 pins, so it's quick & easy to build.

Edit: I had a wiring error, yet it still worked. My 10K download resistor (top right from the 08M2) was plugged into c.0/serout instead of ground. Fixed now, and it works exactly the same. DOH!

 

Attachments

Last edited:

erco

Senior Member
#27
An update from Goeytex on his inverter circuit:

Re: the 74HC14 inverter circuit diagram. All unused inputs on the 74HC14 should be tied to ground to prevent nasty 1 MHz oscillations that can feed back into the power rail and wreak havoc. I have had this happen or two or three occasions. It happens on some chips but not on others, but for future reference, I believe that it is imperative to ground these unused inputs and should be considered standard practice.
 
Top