Using Variables with Debug


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2007
    Posts
    50

    Default Using Variables with Debug

    Hello All,

    I know this is a very basic question.

    I am trying to setup a pic to PC connection for the purpose if checking out variables when using analog components. I have built a cable using Melanie’s PIC to PC post.

    http://www.picbasic.co.uk/forum/show...hlight=parsing

    PortB.1 - RX cable via 1K5 Resistor to PC pin 3 on 9-Pin D Connector
    PortB.2 - TX cable via 1K5 Resistor to PC pin 2 on 9-Pin D Connector
    Vss to PC pin 5 on 9-pin D Connector

    I can send text out using DEBUG just fine but cannot figure out the syntax for sending the contents of a variable using the DEBUG command.

    Thanks in advance
    Best Regards,

    Kurt A. Kroh
    KrohTech

    “Goodbye and thanks for all the fish”

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    There are a lot of different ways to send variables, depends on what you need to do.
    <pre>DEBUG B0 ; Binary Data<br>DEBUG DEC B0 ; ASCII Decimal format<br>DEBUG BIN B0 ; ASCII Binary <br>DEBUG HEX B0 ; ASCII Hexadecimal</pre>Then there are all the variations of the above like ... IDEC, SDEC DEC3, IDEC5, etc.

    The ASCII functions will work with either Bytes or Words, but if you want to send a WORD in "Binary Data" format, you have do each byte seperately<pre>DEBUG W0.byte0, W0.byte1</pre>hth,
    DT

  3. #3
    Join Date
    Sep 2007
    Posts
    50


    Did you find this post helpful? Yes | No

    Default Thanks... That worked great

    Thanks, All I needed wasc the DEC.
    Best Regards,

    Kurt A. Kroh
    KrohTech

    “Goodbye and thanks for all the fish”

Similar Threads

  1. About USB
    By dias11 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 3rd December 2009, 20:41
  2. debug not working with MPASM assempler
    By santamaria in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 4th March 2009, 07:51
  3. Data EEPROM gets clobbered during programming
    By BrianT in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 18th July 2008, 02:46
  4. Need help with debug
    By Darrenmac in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 4th March 2008, 06:37
  5. Debug and some 18F pics
    By sinoteq in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 21st June 2007, 15:10

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts