Running DEBUG full time

Rickharris

Senior Member
Hi all,
I'd like to run DEBUG full time, are there any negative consequences?
cable needs to be connected.

Slows your programme execution time down

PC needed to read output

output may not be understood.

Sertxd is faster, more informative and - just better.

I guess I should ask - why?
 

pilko

Senior Member
I control my Heat Pump using a 28X1 in my workshop, I also have an old PC in there, so I would like to use it for monitoring the inputs and outputs to and from the Heat Pump.
 

inglewoodpete

Senior Member
I control my Heat Pump using a 28X1 in my workshop, I also have an old PC in there, so I would like to use it for monitoring the inputs and outputs to and from the Heat Pump.
Something like that would be ideal. I wrote an application in VB2003 express that logged the debug outputs to a .csv file. This allowed me to load the data into Excel and plot any of the variables for a NiMH battery charger that I was developing.
 

MartinM57

Moderator
A few carefully constructed sertxd's sound a lot better - unless you are completely comfortable with decoding variable names and values to real world parameters in your head/

Even better would be a simple VB app (or EDIT:Robotbasic) with a nice graphical interface representing the pump and its inputs/outputs.

But debug will work fine, given all the limitations above
 
Last edited:

pilko

Senior Member
I would love to have a graphic interface but I am fairly new to this and don't have the programming abilities. I am waiting patiently for ICE (IN Circuit Emulation) to become available.
 

westaust55

Moderator
I would love to have a graphic interface but I am fairly new to this and don't have the programming abilities. I am waiting patiently for ICE (IN Circuit Emulation) to become available.
There are always options like:

1. A 2x16 or 4x20 LCD module and use a PH Anderson serial (one wire) interface to drive the LCD

2. Find a Siemens A55 or Nokia 3310 mobile phone and use the LCD module for a graphical interface. Do a search on Siemens or A55*. You should find one of my past projects on the 102 x 64 gLCD display from a mobile phone. Quite cheap and you can say you built your own :)
 

MartinM57

Moderator
Well, you've got 2 rows of 16 chars or 4 rows of 20 chars, so maybe not all at the same time! Would need to scroll around different 'pages' that shows different info.

Have a look at www.robotbasic.org - download it and have a play, especially the part about receiving serial comms. If you can program a heat pump system with 4 inputs,7 outputs and 13 variables, then I'm sure you can write a fancy PC interface...
...and it's a new skill to pick as well :D
 
Last edited:

MartinM57

Moderator
Example (very quick, very dirty) for a PICAXE to send a single numeric data item up the serial line to a RobotBasic window on a PC. The RobotBasic renders the number as a vertical bar with a height dependent on the value.

Very quick, very dirty, not commented - but it took me about 20mins from a basis of nothing....

PICAXE code
Code:
#picaxe 20x2
#no_table
#no_data

b0 = 0
pause 1000

main:
	sertxd (b0)
	pause 250
	inc b0
	goto main
RobotBasic Code
Code:
MainProgram:
   setcommport 9 //<- change this as required
   last_y = 65

   rectangle 0,0,800,600

   xystring 2,1,"This is a demo of receiving Serial Comms from a PICAXE 20X2"
   xystring 2,18,"Numeric data receive will show as a bar chart in this window"
   xystring 2,35,"Set the Receiver to Baud = 9600, 8 Bits, No parity, 1 Stop Bit, No Flow control"

   while true
     CheckSerBuffer m
     if m > 0
       serin m
       DT_k = m
       gosub DisplayText
     endif
   wend

End

//=====================================================
DisplayText:
 while Length(DT_k) > 0
   DT_kk = ascii(DT_k)
   rectangle 2, 320, 100, last_y, white, white
   rectangle 2, 320, 100, 320-DT_kk, black, black
   last_y = 320 - DT_kk
   rectangle 35, 325, 100, 340 ,white, white
   xystring 35,325, DT_kk
   if Length(DT_k) > 1
     DT_k = Substring(DT_k,2,Length(DT_k))
   else
     break
   endif
 wend
Return
 
Last edited:

alband

Senior Member
Just a few thoughts...

Do you want to store the data or just view it?

Also, if you don't want the PC on all the time, (not sure what the heat pump is so might not be on for long) you could store the data onto an SD card stright from the PICAXE. Then when its finished you can pop the card into the PC and take everything off it in a few seconds.

There is a SD card reader from 4D systems that works, and I think there is a thread about it.

EDIT: Here we go http://www.picaxeforum.co.uk/showthread.php?t=11180&highlight=SD+4D courtesy of the Dr.
 
Last edited:
Top