PicBasic Pro Math Problem??


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Oct 2004
    Location
    Hangover, Germany
    Posts
    289


    Did you find this post helpful? Yes | No

    Default

    The solution should be easy:

    You want to convert an ASCII-string to a decimal number.

    You forgot, a ASCII-number has not the value from 0 to 9, but from $30 to $39. So you must truncate some bits !

    Try FL=...(myvar[...] & $F) * 10... !!!!
    PBP 2.50C, MCS+ 3.0.0.5, MPLAB 8, MPASM 5.14, ASIX Presto, PoScope, mE mikroBasic V7.2, PICKIT2

  2. #2
    Join Date
    Mar 2006
    Location
    Vancouver
    Posts
    2


    Did you find this post helpful? Yes | No

    Smile Problem Solved!!!!

    Thanks BigWumus...

    The code is working perfect, I missed the ASCII part, good thing for the forums.

    Sorry Darrel Taylor, I should have been more explicit with my post. (Boss breathing down my neck).

    Thanks again...

    Glen65

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


    Did you find this post helpful? Yes | No

    Default

    My fault Glen, I didn't see you had the symptoms intermixed with the code.

    I tend to not look at code that isn't within [CODE] tags, cause it's so hard to read, all scrunched to the left.

    Thanks to BigWumpus, my lazyness was overcome.

    Carry On,
       Darrel

Similar Threads

  1. Problem on writing EEPROM in Winpic800 with picbasic pro
    By selimkara in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 4th May 2007, 16:33
  2. How to configure SPI in PICBASIC PRO?
    By moogle in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 15th April 2007, 18:31
  3. PicBasic Pro problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 27th March 2007, 22:22
  4. Math problem...with picbasic pro
    By pcaccia in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 15th October 2005, 19:28
  5. Problem with Picbasic Pro and PIC10F202, PIC10F206
    By mikaljan in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 11th May 2005, 21:02

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