ARRRGH!!!

twisted wire

Active member
I'm having trouble reading ADC, this time it's getting the debug table to show anything other than what is set (Default?) on the adjust analogue value facility in the simulate mode?
Also, the program doesn't seem to run except in simulation mode?
I wrote a simple 'test' to try and understand what I'm doing wrong - which hasn't helped at all........
Below is the test program:

Start:
readadc C.1,B1
pause 10
debug B1
pause 10
goto start

If anyone has any patience left for me, I'd be grateful for any advice
 

The bear

Senior Member
Hi,
I've never used debug.
;ADC pin = C.4

#Picaxe 08M2 ;14M2 ;20M2
#No_data

#Com 3
#Terminal 4800


Start:
Readadc C.4,b1
Pause 10

Sertxd ("The value of b1 is " ,#b1,13,10)

;Debug b1
Pause 10
Goto start
 

twisted wire

Active member
Thanks Bear! I have, presumably?, omitted the Semicolon prior to the DEBUG command - didn't know it was required.
I shall try this (once the "boss" stops making wholly unreasonable demands on my time :rolleyes:)
I shall post the results: unless it doesn't work - in which case I may decide to go back to fly fishing instead!
 

neiltechspec

Senior Member
That semicolon just disables the debug command.
It's the sertxd that's showing you the value of b1.

I am another one who has never bothered with "debug", always used sertxd instead.
 

inglewoodpete

Senior Member
Me neither! I'm definitely a Sertxd man. Memorize that 13,10 format, I say!
Why not use the CR, LF format? Carriage Return (go to start of line), Line Feed (go to next line). Admittedly, old terminology meant for old printers but it makes much more sense to me.
 
Top