PE 6.0.8.0 problem with AXE27 com, PE 5.5.1 works every time.

binary1248

Senior Member
I am using an AXE027 download cable.
My project is using a 40X2 chip
And the AXE091 Development board.
Sometimes the program loads, sometimes it gives me a comm port error.
Yet on PE 5.5.1 program loads always work, with the same program, same port (port4 in my system).
Running on a VISTA widows.
.
I like the new PE6 but this error occurs to often so until I get some direction where the problem
lies, I am going back to 5.5.1

I'll post the code shortly, but since it always works on PE 5, but only sometimes on PE6. This is a only problem with downloads to the 40X2, if it loads, the program executes fine.
.
Here is the code, which runs fine on either downloads, but 50% of the time it won't download using PE 6.0.8.0

Code:
' Name: PendulamDriveNoXtal
'Pendulam drive without Xtal timing
'3/31/2015

#picaxe 40X2
 
#no_data   'save some load time
#no_table
'#terminal 9600
let adcsetup = %00000001
'
'
let dirsb = %11111111   'All D port pins high
'
'setup serial lcd
	 SETfreq m4		'####**** NEED TO adjust freq for ser 9600 baud to 
 							'work correctly for LCD later.
	
'switch b ports to output
 	
 	
symbol ADvalue = b1
symbol PenLED = b.6   'pendulam trip LED indicator


mainx:


		readadc 0,ADvalue		;physical pin 2  read value into ADvalue
		;
	if advalue > 5 then ;
		high PenLED	;set led on, Physical pin 39
		pause 30
			;Wait for pendulam swing to go past estimated center point, then push
		pause 50   ;50 ms delay
		high B.7 ; switch on output B.7 Pulse B.7 to push pendulam. Physical pin 40
		pause 100 ; wait 100 millisecs
		low B.7 ; switch off output B.7
	
		
	else
		low PenLED	;clr pendulam led
	end if

goto mainx
SCREEN SHOT of ERROR with Editor Page.

View attachment 18072
 
Last edited:

binary1248

Senior Member
Problem with 6.0.8.0 still happening, thought the problem had gone away but it didn't.??????
 
Last edited:

binary1248

Senior Member
Well, the problem is back using a different setup. This uses no inductive circuit to cause a spike and the power supply is well regulated at 5.02V and filtered.
Sometimes 6.0.8.0 will down load the program to the 8M2 chip and then suddenly it will not. I did testing by loading the same program to the chip over and over without changing any setup or cabling. When the program load fails the msg error says "Error: Hardware not found on 4!" but trying again with no changes it may or may not load.
These are the com setup messages, I am always using COM 4, for 6.0.8.0 or 5.5.1

Com 4 Ready for use AXE027
or
Com 4 AXE027 PixAxe USB
Now 5.5.1 always loads without fail, so for now I am stuck with 5.5.1, which is great for me, but 6 does have some nice features.

While the code should have nothing to do with intermittent load failures I will post it.
.
This happens on a wired breadboard or on the PicAxe experimenter board (AXE091 Development board).
Any help would be appreciated.
Paul
Code:
;April 30 2015   PEH
;   *************************
;   *Pendulam Timer         *
;   * Flie = PendulamtmrXX  * 
;   *************************
;
;
; Changed timing on dly & push 5/8/2015
;
;
#picaxe	08M2
#com 4	'specify com port
;
#no_data   'save some load time
'#no_table
'#terminal 4800

;
symbol redled=C.2 ;pin 5 on chip

	
symbol inputx=pin3   	;input pin 4 on chip
				'symbol outblck=pin4  ;input pin 3 on chip  not used
symbol dly = 35		;was 20
symbol pushx = 15		;was 50, then 25
W7=0

Start:
	input 3,4         ;make ports 3 & 4 inputs, physical pins 4,3 
  ;little startup test seq lamp/coil	
	
	for b1=1 to 10  'little led test
	high redled
	pause 20   ;red led on, coil pwr
	low redled
	pause 20
	next b1
	low redled   ;red led off as we exit test
	'

	serout c.0,T2400_4,(0XFE,0X51) 'Clr LCD Display;
	pause 100
	serout c.0,T2400_4,("READY ...........") 'Display value follwed by Hom
	Pause 100
	serout c.0,T2400_4,("Clearing LCD ",0XFE,0X51,"READY") 'clear lcd command
	
	;
	Main:
	'
'	serout c.0,T2400_4,("Clearing LCD ",0XFE,0X51) 'clear lcd command
	
 Do
	;	Find entry switch triped
	if inputx=0 then  ;physical pin 4, no bounce detection needed
	  pause	dly    'let pend swing past center
	  high redled 'Apply coil power
	  pause pushx     'keep pwr on for delay time 
	  low redled  'remove coil pwr 	
  W7=W7+1		   'for timing testing only
  serout c.0,T2400_4,("Clearing LCD ",0XFE,0X51) 'clear lcd 
  serout c.0,T2400_4,("CTS = ",#W7,0XFE,0X46) 'Display value follwed by Home Cursor
	 
	else 
	  low redled
	endif
	
	
	  low redled
 Loop
 
Last edited:

hippy

Technical Support
Staff member
There doesn't seem to be anything with your code which would cause problems. You are using the C.0 download serial out pin for LCD, and while I cannot see that it would affect downloads, it might be worth commenting those out to see if that improves things.

Other than that, suspicion falls on the hardware perhaps doing something adverse when download is initiated. If you have the 08M2, without hardware connected, can you download to that without there being problems ?
 

binary1248

Senior Member
The pulse coil, reed switch and LCD serial display are disconnected during downloads, but I will try commenting out all references to serial data.
As I stated elsewhere, this problem occurs with the AXE091 development board with 40X2 and my BB with the 08m2. I don't have a 2nd AXE027 cable to try, but I will get one from a friend.
 

binary1248

Senior Member
With the serial commands present it took 6 times to get the errors "Hardware not found"
Without it took 8 times to get the error.
Thus no difference.
The only thing left is to get another AXE027 cable to try.
Of course I can just stay with Ver 5 for now.
Thanks Hippy for you help.
.
.
EDIT: I did notice the connect time befor downloads started varied a lot between downloads, guess some were long enough to trip the error routine.
 
Top