PDA

View Full Version : How to convert string to dword or byte



Requan
- 20th November 2010, 19:47
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

mackrackit
- 20th November 2010, 20:04
Are you using PicBasic or Proton?
If Proton try here.
http://www.protonbasic.co.uk/forum.php