Getting the "," in the middle


Results 1 to 6 of 6

Threaded View

  1. #5


    Did you find this post helpful? Yes | No

    Default

    Hi all,

    i recently descovered a little bug in my code.

    The result value was working just fine and i was getting it in the xx,x format.
    This works well until i reach 99,9șC. After this i get the 4th digit in and the result ( instead of 110,5șC for example ) is 10,5șC .

    This is due to the way the code is handling the value and sending it out.

    Code:
    'code for AD
    adcin temp,va
    tempe=(va*/2500 )>>2
    
    'code to output value retrieved from eeprom
    debug dec2 RA/10,",",dec1 RA//10,13,10
    How can i get the "," in there with 3 digits but keeping it when it reaches the 4th ?


    EDIT:

    This is what i i'm thinking:
    Code:
    debug dec3 RA/10,",",dec1 RA//10,13,10
    Any idea ?
    Thanks
    Last edited by ruijc; - 30th March 2008 at 14:19.

Similar Threads

  1. RB0 + Internal Pullup + Interrupt
    By Freman in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 10th August 2009, 11:11
  2. pins in arrays?
    By scorpion in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 17th September 2005, 08:18
  3. pic with 3.3v
    By mischl in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 8th July 2005, 18:28

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