Programing Editor not seeing Com port

Pat13

Senior Member
Hello All!
I have not posted in a while. I recently switched laptops, and am using Windows 8. I was trying to flash a 14M2 but the Editor could not find the Com port. I was not sure if I had run the Axe027 driver, so I installed that driver. However, the Editor is still not finding the COM port. I have tried Versions 5.5.5 and 6.0.7.5. Any help appreciated.
 

MurrayJ

Senior Member
I had something similar a while back when I got a new computer. No amount of installing/deleting/reinstalling did any good. If I remember correctly I had to go to the device manager and tell it to manually update the driver, it was showing an error symbol for the driver or com port there.
 

inglewoodpete

Senior Member
I'm using Windows 8.1 but the following should work for you.

First, if using the AXE027 or similar USB-to-Serial cable, ensure it is plugged into a working USB port. You will normally hear a sound when the computer recognises that a USB peripheral has just been plugged in.

Go to Control Panel>System>Device Manager

In the top level list of devices/drivers, you should see an item > Ports (COM & LPT)

Expand the item and you should see an entry for the device. Refer to the screen snip, below. It will also indicate the com port number (mine has been allocated COM4).

If you do not see the COM port or it has an 'error' icon, you have a hardware or driver problem associated with the hardware.

Com Port.PNG
 

westaust55

Moderator
Preferably always plug into the same USB port (otherwise you need drivers set up for each USB port used).

Always make sure that the AXE027 cable is plugged into your PC/Laptop before your start the Programming Editor.
Otherwise the PE cannot find the AXE027 cable and will default to COM1.

If the drivers are installed and seen in Device Manager, then in the Programming Editor:
1. Select Options/Serial Port
2. If you see the AXE027 (or other) download cable select it
3. If do not see the AXE027 cable select the tick box "Show Port Help Tools..." then, click "Scan for USB cable" which will show you which port to select.
 

srnet

Senior Member
Hello All!
I have not posted in a while. I recently switched laptops, and am using Windows 8. I was trying to flash a 14M2 but the Editor could not find the Com port. I was not sure if I had run the Axe027 driver, so I installed that driver. However, the Editor is still not finding the COM port. I have tried Versions 5.5.5 and 6.0.7.5. Any help appreciated.
Did you follow the instructions on the drivers download page;

http://www.picaxe.com/Software/Drivers/AXE027-USB-Cable-Driver/


"Note the preinstaller may only be used before the AXE027 is first inserted.
If the AXE027 has ever been inserted you must use the manual zip download below instead"
 

grim_reaper

Senior Member
I found with Windows 10 (and I will presume just as much for Windows 8 or 8.1) that the newer driver that Windows downloads from the internet does not in work.

The version I keep with my 'axe software is v2.8.14.0, produced by Rev-Ed, dated 18th March 2011, and that works fine.
If the driver version you have installed is new, I would recommend manually installing the older one.
 

Technical

Technical Support
Staff member
If you have installed PE6 the correct driver files are actually already on your machine (or you can download again if you prefer)

In PE6 click File>Help>AXE027 Drivers Folder to find them. This click will also copy the correct path onto the clipboard, so you can just use Ctrl+V to paste the path into any editor (including PE6, or even to the New Hardware Wizard itself).

Then follow the instructions in the AXE027 datasheet at www.picaxe.com/docs/axe027.pdf
 

davidwf

Senior Member
Error: Hardware not found on COM port

hmmm...now experiencing this very issue with 18M2+...all up to date, loopback works fine, all resistors are correct, works fine if you de-power, start a download the re-power
I replaced the PIC chip and the new one worked fine for a few days now the same problem again diagram.PNG
 

inglewoodpete

Senior Member
A couple of further things you can try.

1. Connect an LED with a 470- to 1000-ohm resistor in series between leg 2 (C.3) and 0v: cathode (flat side) to 0v. I suggest that you solder them in to get a positive diagnosis. Any activity on the SerOut pin, SerTxd or programming attempts, will be indicated by flashing of the LED.

2. With the LED in place, temporarily connect the junction of the 10k and 22k download resistors to 5v. Two things should happen. As Alan reminds us: Do you have a Disconnect or SerRxd command? If so, you will need to power cycle the chip with this link in place.
(i) The LED should flash, indicating (to the PE normally) that the PICAXE is ready for a download.
(ii) Your program should stop and restart when you insert and remove the link.
 
Last edited:

westaust55

Moderator
Another possibility is having a very tight programming loop, particularly if the clock is set to higher speeds that prevent the PICAXE "seeing" the SerialIn pin go high to signify a new download.

For future reference, one way to avoid problems with downloading is to put a PAUSE command for say a 1 second delay at the very start of the code.


When you say the new 18M2 does not work after a while please be more specific.
Does the program no longer work at all?
Does the previously downloaded program still function but you cannot download a new version?

Suggest post your program so that folks can see what you are doing a reduced the guessing.
 

hippy

Technical Support
Staff member
No, neither of those ..... it was working perfectly....
Perhaps post your full code. If it works with a power-cycling Hard Reset that suggests the PICAXE is still working fine and it is something in the program which is preventing the PICAXE reacting to the download initiation. That can be DISCONNECT and SERRXD, but also long PAUSE commands, SLEEP and NAP, and any blocking commands like SERIN, IRIN, KBIN, RFIN.
 

davidwf

Senior Member
voltage across PIC is steady at 5.03V
I have used a low current LED & 4K7 resistor for the test to reduce current loading to a minimum
The LED does not flash whilst trying to download (laptop and PC both report no hardware present)
After re-starting during a pre-commenced download the LED does flash and the PIC programs OK
If re-powered with the suggested link kept in place it does flash about once every 3 sec, removing the link after this the LED flashes rapidly for about 1 sec then goes out
When initially powered up (no link) the LED flashes for about 1/2sec
With the AXE lead inserted I see the PIC boot up on terminal window after re-powering
The program seems to stop and start as indicated with the link applied / removed
I am leaving the cct de-powered for long enough to discharge all capacitors
If, as I strongly suspect, the PIC is getting damaged what on earth would cause it ?
 
Last edited:

inglewoodpete

Senior Member
[A] voltage across PIC is steady at 5.03V
I have used a low current LED & 4K7 resistor for the test to reduce current loading to a minimum
[C] The LED does not flash whilst trying to download (laptop and PC both report no hardware present)
[D] After re-starting during a pre-commenced download the LED does flash and the PIC programs OK
[E] If re-powered with the suggested link kept in place it does flash about once every 3 sec, removing the link after this the LED flashes rapidly for about 1 sec then goes out
[F] When initially powered up (no link) the LED flashes for about 1/2sec
[G] With the AXE lead inserted I see the PIC boot up on terminal window after re-powering
[H] The program seems to stop and start as indicated with the link applied / removed
I am leaving the cct de-powered for long enough to discharge all capacitors
[J] If, as I strongly suspect, the PIC is getting damaged what on earth would cause it ?


I'm assuming that this is in response to my post #10. My inferences from your diagnostics:
[C] Suggests that the PICAXE is not checking the download pin while running. However, there do not appear to be any 'blocking' commands in your code.
[D] Suggests normal behaviour.
[E][F]&[G] Indicate a normal boot-up. The flashes are the data being sent by SerTxd commands immediately after boot up.
[H] Suggests normal behaviour - the PICAXE is monitoring the download pin. However this is countered by [C]
[J] We need more information. A damaged PICAXE is a damaged PICAXE. Are chips dying and never working again or are they coming back to life under certain conditions?

I've used hundreds of PICAXE and PIC chips. They are pretty tough. The only way I have damaged them is with over voltage - I've had 5v voltage regulators fail to regulate: PICs/PICAXEs fail at about 8 volts! I've accidently connected 12v to an I/O pin - that pin stops working but the PIC seems to survive.

Could you have a dodgy connection inside your download cable (serial-in wire)? Or between the download socket and the junction of the 10k/22k resistors? Points [C] and [H] do not add up.

Looking at your circuit diagram: can the 78L05 sustain 5v when the transmitter is sending data?
 

westaust55

Moderator
After re-starting during a pre-commenced download the LED does flash and the PIC programs OK

If, as I strongly suspect, the PIC is getting damaged what on earth would cause it ?
With only an iPhone currently I cannot open the program to review.
The above suggests that a hard reset is allowing you to re-program the PICAXE chip.
Thus it seems that if no disconnect command is being used there is something else keeping the program "busy" so that it does not see the SerialIn pin go high to indicate a new program download is intended.

What happen if you enter/download a simple program to loop and increment and SERTXD a count value to the PE terminal screen?
Can you then download a new program without needing to power down the PICAXE?
 

davidwf

Senior Member
hmmm...other programs do appear to load & re-load without issue......so what on earth is causing my problem ?
Edit...just ran it on the SIM and it seems to error at line 317
 

Attachments

Last edited:

inglewoodpete

Senior Member
hmmm...other programs do appear to load & re-load without issue......so what on earth is causing my problem ?
Edit...just ran it on the SIM and it seems to error at line 317
I think you've found your problem. You must initialise i2c before trying to use it. Otherwise, it bricks your PICAXE. When you run your code on a real chip, there is no opportunity to report errors like this.
 

inglewoodpete

Senior Member
OK, thanks......"how" would I do that please - this is all quite new to me !
To use your X2 PICAXE as an i2c master, you need something like the following commands in the startup lines (run once) of your programme. Note that the address of the i2c slave must be shifted one bit to the left (multiplied by 2) for the setup command. The symbol statement should go in your definitions area at the top of your programme.
Code:
[color=Blue]Symbol [/color][color=Black]i2cAddrDS1307 [/color][color=DarkCyan]= [/color][color=Navy]%11010000 [/color][color=Green]'$D0: i2c address of the DS1307 RTC chip[/color]
Code:
[color=Blue]hi2cSetUp i2cMaster[/color][color=Black], i2cAddrDS1307, [/color][color=Blue]i2cslow[/color][color=Black], [/color][color=Blue]i2cbyte  [/color][color=Green]' set DS1307 slave address with byte addressing[/color]
You will also need to initialise your clock chip with the correct time and date. Run the following code once and then comment it out, otherwise it will reset the time in the clock chip every time the PICAXE is restarted.
Code:
[color=Green]' ----- StartClock: Set Time and Start Clock -----------------------------------------
'
'Set time and date e.g. to 11:59:00 on Thurs 25/12/03
'Numbers are expressed in BCD (Coded in Hex Eg $25 = "25")
'
'   bcdSeconds = CSSSssss C: Clock Halt = 1, Run=0        SSS=0-5 ssss=0-9
'   bcdMinutes = 0MMMmmmm                                 MMM=0-5 mmmm=0-9
'   bcdHours   = 00HHhhhh 24-hour mode                     HH=0-2 hhhh=0-9
'or bcdHours   = 011ahhhh 12-hour mode  a=0 am; a=1 pm     HH=0-2 hhhh=0-9
'   bcdDay     = 00000ddd Day-of-week indicator                    ddd=1-7
'   bcdDate    = 00DDdddd                                  DD=0-3 dddd=0-9
'   bcdMonth   = 000Mmmmm                                   M=0-1 mmmm=0-9
'   bcdYear    = YYYYyyyy                                YYYY=0-9 yyyy=0-9
'   Control = %o00E00RR  Enable output pin
'              o..E..RR  RR Rate of square wave output, where...
'              |  |  |_  00 1Hz; 01 4096Hz; 10 8192Hz; 11 32768Hz
'              |  |____  Enable square wave output = 1; Disable = 0
'              |_______  Set output level of pin when square wave in DISabled 
'
' Note that programme takes about 40 seconds to download when configuring the time here
'[/color]
[color=Black]StartClock: bcdSeconds  [/color][color=DarkCyan]= [/color][color=Navy]$40 [/color][color=Green]' If Bit 7 (MSB) = 1 then clock oscillator is disabled: programme takes about 30 seconds to load
            [/color][color=Black]bcdMinutes  [/color][color=DarkCyan]= [/color][color=Navy]$52 [/color][color=Green]' Bit 7 always = 0
            [/color][color=Black]bcdHours    [/color][color=DarkCyan]= [/color][color=Navy]$17 [/color][color=Green]' Bit 7 = 0; Bit 6: 0 for 24-hour, 1 for 12-hour; If 12-hour, Bit 5 is am/pm indicator 
            [/color][color=Black]bcdDay      [/color][color=DarkCyan]= [/color][color=Navy]$05 [/color][color=Green]' Bits 7 - 3 always 0 Monday = 1; Sunday = 7
            [/color][color=Black]bcdDate     [/color][color=DarkCyan]= [/color][color=Navy]$02 [/color][color=Green]' Bits 7 - 6 always 0
            [/color][color=Black]bcdMonth    [/color][color=DarkCyan]= [/color][color=Navy]$09 [/color][color=Green]' Bits 7 - 5 always 0
            [/color][color=Black]bcdYear     [/color][color=DarkCyan]= [/color][color=Navy]$11 [/color][color=Green]' BCD value range = 00 to 99
            '
            [/color][color=Black]Control  [/color][color=DarkCyan]= [/color][color=Navy]%00010000 [/color][color=Green]' Enable output at 1Hz
            '
            [/color][color=Blue]Writei2c [PLAIN][[/PLAIN][/color][color=Black]i2cAddrDS1307[/color][color=Blue][PLAIN]][/PLAIN][/color][color=Black], [/color][color=Navy]0[/color][color=Black],[/color][color=Blue]([/color][color=Black]bcdSeconds, bcdMinutes, bcdHours, bcdDay, bcdDate, bcdMonth, bcdYear, Control[/color][color=Blue])
            [/color][color=Green]'
            [/color][color=Blue]SerTxd (CR[/color][color=Black], [/color][color=Blue]LF[/color][color=Black], [/color][color=Red]"Clock now set."[/color][color=Black], [/color][color=Blue]CR[/color][color=Black], [/color][color=Blue]LF)
            GoSub [/color][color=Black]GetTime                       [/color][color=Green]'Read the time variables
            [/color][color=Blue]GoSub [/color][color=Black]ShowTime
            [/color][color=Blue]Return[/color]
 

davidwf

Senior Member
Thanks for that....it is totally meaningless to me but I guess it will mean something to the PICAXE chip :)

You are however referencing the DS1307 but I am using the DS3231 RTC module http://www.ebay.co.uk/itm/DS3231-RTC-AT24C32-I2C-Precision-Real-Time-Clock-Memory-Module-Arduino-UK-FAST-/400902900013?var=&hash=item5d57acc92d:m:mfx_VqUX-Lh0uUqLbyQhyIw .... don't know if that would make any difference / affect operation of your code ??

Have a read through MTV Getting Started with the DS3232 (same family) to gain an understanding of the DS323x family:
http://www.picaxeforum.co.uk/showthread.php?23739-Getting-Started-with-the-DS3232-RTC-and-a-brief-comparison-of-some-other-RTC-chips
 
Last edited by a moderator:

westaust55

Moderator
This is where providing information such as the type of chips being used earlier can avoid frustralition.

The Ds1307 is the more common RTC used by PICAXE users however others do use the DS3231/DS3232 parts and some other parts also.

The data sheet for all i2c chips gives the slave address. See:
https://datasheets.maximintegrated.com/en/ds/DS3231.pdf

It so happens (because like chip types usually have the same i2c slave address) that the DS3231 slave address is $D0, the Sam as given by inglewoodPete for the DS1307.
However there are differences with the other registers.

Edit: (this bit got "lost" when first inserted)
See my getting started for the Ds3232:
http://www.picaxeforum.co.uk/showthread.php?23739-Getting-Started-with-the-DS3232-RTC-and-a-brief-comparison-of-some-other-RTC-chips
A lot of similarities with the DS3231 but the Ds3231 does not any battery backed RAM memory
 
Last edited:
Top