1 slave 1 master 1 MAX232 1 problem ?


Closed Thread
Results 1 to 20 of 20

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    test(0) holds the first ASCII digit (tens) = example 49
    test(1) holds the second ASCII digit (units) = example 53

    Value var byte

    value=((test(0)-48)*10)+(test(1)-48)

    value using our example ASCII 49 53 will be decimal 15.

    If 'value' is likely to be bigger than 255, then it'll have to be a word.

    You now have the knowledge... be creative...

    I recon the hood in your avatar is stopping you seeing the big picture... lose the hood, buy a crate of beer...

  2. #2
    Join Date
    May 2005
    Posts
    49


    Did you find this post helpful? Yes | No

    Red face ok it's working

    test var byte
    test2 var byte
    value var byte
    loop:
    hserin [test,test2]
    value=((test-48)*10)+(test2-48)
    if value=15 then
    goto ok
    else
    goto fail
    endif
    goto loop
    ok:
    hserout ["you did it!",13,10]
    goto loop
    fail:
    hserout ["U re an idiot",13,10]
    goto loop
    end
    now did it and after i see u re code test(0) means 1 number.(0) useing this is a litle bit same like useing index in visual basic right?
    Asking is not a shame but not learning is a SHAME!!!

Similar Threads

  1. My code for TV remote and MIBAM for RGB control
    By idtat in forum Code Examples
    Replies: 4
    Last Post: - 12th January 2013, 20:52
  2. Delayed output 10 secs
    By lilimike in forum mel PIC BASIC Pro
    Replies: 37
    Last Post: - 14th October 2011, 06:28
  3. first project, and yes, doesn`t work
    By bogdan in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 28th April 2009, 06:13
  4. DS1820 headache
    By Calco in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 12th August 2004, 00:28
  5. New member
    By jmgelba in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 28th February 2004, 22:44

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