Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:49 24 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Electronics : picaxe quirk

Author Message
GWatPE

Senior Member

Joined: 01/09/2006
Location: Australia
Posts: 2127
Posted: 05:18am 16 May 2008
Copy link to clipboard 
Print this post

Has anyone noticed that output 2 of an axe 05M goes high when an ADC input function is called. This happens on the simulator. I normally use this as a PWM output excusively.

This little program demonstrates:-

main:
pause 2000
high 0
pause 1000
high 1
pause 1000
high 2
pause 1000
high 4
pause 1000
low 4
pause 1000
low 2
pause 1000
low 1
pause 1000
low 0
pause 1000
readadc10 4,W0
goto main
end

The usefulness of the output 2 is limited when this occurs. .. .. Gordon.



become more energy aware
 
Gill

Senior Member

Joined: 11/11/2006
Location: Australia
Posts: 669
Posted: 10:51am 16 May 2008
Copy link to clipboard 
Print this post

Gordon,
I ran that little exercise through the simulator and all seemed to go OK. the only comment is that you would need the line
let dirs = %00000111
added before
readadc10 4,wo
to change pin4 from output to input. Though I'm guessing this was just an trial setup to highlight the glitch you have.

Then I ran this (your test with debug added)(pin 0 removed as used for debug) on an actual 08m and still found no fault with pin 2.

#picaxe08m

main:
debug
pause 2000
;high 0 ; can't use 0 high & low when using debug
;pause 1000
high 1
debug
pause 1000
high 2
debug
pause 1000
high 4
debug
pause 1000
low 4
debug
pause 1000
low 2
debug
pause 1000
low 1
debug
pause 1000
;low 0 ; can't use 0 high & low when using debug
;pause 1000
readadc10 4,W0
debug
goto main
end

Maybe you could show us an excerpt from the actual code where simulation is sending pin 2 high when readadc10 is used? As I say, I can't duplicate the error yet.
was working fine... til the smoke got out.
Cheers Gill _Cairns, FNQ
 
GWatPE

Senior Member

Joined: 01/09/2006
Location: Australia
Posts: 2127
Posted: 12:34pm 16 May 2008
Copy link to clipboard 
Print this post

Hi Gill,

I have pasted the modified code that you posted, and I present the outputs. I have included the about screen for the programmer and 2 screen dumps from the running program. One just before the readadc command, and then just after.







I will test with a chip in the real world. There may be something with the version of the programmer.

There is no way that the pin 2 output should change state in this way.

I will continue tomorrow. .. Gordon.
become more energy aware
 
GWatPE

Senior Member

Joined: 01/09/2006
Location: Australia
Posts: 2127
Posted: 01:56am 17 May 2008
Copy link to clipboard 
Print this post

Hi Gill,

I have tested on a chip in the real world, and it is OK, so there must be something up with the simulator. .. Gordon.
become more energy aware
 
Gill

Senior Member

Joined: 11/11/2006
Location: Australia
Posts: 669
Posted: 03:59am 17 May 2008
Copy link to clipboard 
Print this post

G'day Gordon,
Yes, I see what you say with pin 2 high. most strange.
Good that it tests OK in the real world.
I had installed the little update that takes V5.1.5 to V5.2.0. Perhaps it is a glitch in the software that has been fixed in the update? I bet you find the update before I send this so hopefully all good with simulation now.

I had one where the readADC value always came out incorrect. I added small pauses to no avail then found if I repeated the same line the second reading was correct. Just a glitch in the chip I guess, at least I found a workaround for that one.
was working fine... til the smoke got out.
Cheers Gill _Cairns, FNQ
 
Gill

Senior Member

Joined: 11/11/2006
Location: Australia
Posts: 669
Posted: 06:12am 21 May 2008
Copy link to clipboard 
Print this post

Came across this same/similar problem on the official PicAXE Forum here
There's not much discussion and it doesn't go anywhere. At least that shows it's not a fault exclusive to your software.
was working fine... til the smoke got out.
Cheers Gill _Cairns, FNQ
 
SparWeb

Senior Member

Joined: 17/04/2008
Location: Canada
Posts: 196
Posted: 07:18pm 27 May 2008
Copy link to clipboard 
Print this post

I found an excellent website, including known bugs, here:

http://www.hippy.freeserve.co.uk/picaxe.htm


Steven T. Fahey
 
Gizmo

Admin Group

Joined: 05/06/2004
Location: Australia
Posts: 5078
Posted: 09:05pm 27 May 2008
Copy link to clipboard 
Print this post

Thats a good site, thanks for the link Steven. I'll add it to my PicAxe page in the near future.

Glenn
The best time to plant a tree was twenty years ago, the second best time is right now.
JAQ
 
GWatPE

Senior Member

Joined: 01/09/2006
Location: Australia
Posts: 2127
Posted: 03:08am 28 May 2008
Copy link to clipboard 
Print this post

Hi Gizmo,

I did not find a reference to the AXE-08M in the link that was provided above.

I have just perused the Microzed website and found a useful companion to the picaxe. The serial LCD. I had toyed with making my own for the BS2. The unit is not too expensive. A single output is needed and + & -. The unit even works on the output0, programming port of the picaxe 08M, so 4 inputs are still available.

This sort of display will have all sorts of uses. Gordon.


become more energy aware
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024