How to convert string to dword or byte


Closed Thread
Results 1 to 2 of 2

Hybrid View

  1. #1
    Requan's Avatar
    Requan Guest

    Default How to convert string to dword or byte

    Dear All,
    I made program to comunicate with PC via RS232 and send temperature.
    I wolud lkie to send from PC to PIC value of limits.

    Problem is that i receive limit as string but i have to use in program as value e.g.:
    I received in bufor first limit:
    Dim Buf[2] as byte
    in bufror i have:
    Buf = "20"
    i would like to save 20 as value into eeprom, and use it to compare with temperature.
    (e.g. if temperature< limit than)
    How to convert to value?
    Martin

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Are you using PicBasic or Proton?
    If Proton try here.
    http://www.protonbasic.co.uk/forum.php
    Dave
    Always wear safety glasses while programming.

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