well ,, again, the pbp manual, has decent explanitions of comands, do you have a copy?
well ,, again, the pbp manual, has decent explanitions of comands, do you have a copy?
yes, and I've read it, pg54 as stated, I'm just wondering if anyone has a better setup to getting the info on screen.
as asked, I'd like to see the DEBUG info in PBP compiler, or in microcode studio if possible.
this is not covered in the manual.
Last edited by kenpo; - 21st February 2005 at 18:26. Reason: spelling mistakes :(
yeh i just skimmed the whole pbp manual, didnt see debug, ive got a diferent one then you apearantly,
O.k.. DEBUG in PBP is about the same than SEROUT BUT it take less of your code space. If you want to use DEBUG you'll have to define few things before it work properly to send data to your PC without any kind of MAX232 or else inverter chip
1. set the baudrate
DEFINE DEBUG_BAUD 2400
2. set inverted mode
DEFINE DEBUG_MODE 1
3. set the DEBUG serial out pin
DEFINE DEBUG_REG PORTB
DEFINE DEBUG_BIT 0 'These two line will set your debug out on the PORTB.0
Once its done you'll be able to send your data in serial to your PC with
DEBUG #MyVar
this will send the ascii representation of MyVar value.
If you want to send with SEROUT on PORTB.0 at 2400 baud inverted
SEROUT PORTB.0,4,[#Myvar]
Both of the above will work with a simple 1k in serie with the PIC to the pin2 of your DB9 connector.
You can monitor everything in the MicroCode Studio Serial window or in Hyperterm, RealTerm or else terminal program.Code:TRISB=0 DEFINE DEBUG_BAUD 2400 DEFINE DEBUG_MODE 1 DEFINE DEBUG_REG PORTB DEFINE DEBUG_BIT 0 'These two line will set your debug out on the PORTB.0 MyVar var byte clear start: DEBUG "MyVar=",#MyVar,13,10 pause 500 if MyVar<255 then MyVar = MyVar + 1 ELSE Myvar = 0 ENDIF goto start
Last edited by mister_e; - 21st February 2005 at 18:56.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
WOW! WICKED!! thanks man!
debug was the final and LAST reason I was hanging onto my Basic Stamp2 for prototyping. time to sell it and say goodbye to it forever!!
oh, also, just outa curiosity, is there any preferance as to what pin the debug is used on? porta or B?
No. since your selected pin can be an output and it's not an open drain type (like many RA4) it will work without anything else than 1 resistor.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Trent -
The 13,10 are the decimal equivalents of Carriage Return (CR) and Line Feed (LF) control characters. So each time you send the command to hyperterminal it will be nice and neat on seperate lines.
Wisdom is knowing what path to take next... Integrity is taking it.
Ryan Miller
One question concerning debug command.
With which BAUD rates can it be used ?
.
Bookmarks