View previous topic :: View next topic |
Author |
Message |
Markdem
Joined: 24 Jun 2005 Posts: 206
|
sting as int. ds1307 problem |
Posted: Sun Jan 01, 2006 9:39 pm |
|
|
Hi All, i am tring to set the time on a ds1307 using a vb app i have made. The only problem here is i dont know much about c or vb :(
Anyway, the problem is that the vb app is sending rs232 data as a string, but i need a int to set the time and date. Am i right in saying this is a type casting problem??
Does anyone have any ideas on how i should do this?
Thank you very much |
|
|
Markdem
Joined: 24 Jun 2005 Posts: 206
|
|
Posted: Sun Jan 01, 2006 10:08 pm |
|
|
Hi All again, i might add alli really want to know is how change the recived data froma string to a int. Right now, when i recive the data as a int, i will get the ascii codes for the numbers, eg 1 = 48. I need the pic just to save the number i am sending
Thanks |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1934 Location: Norman, OK
|
|
Posted: Sun Jan 01, 2006 10:27 pm |
|
|
Take a look at ATOI() on page 90 of the latest manual. |
|
|
Markdem
Joined: 24 Jun 2005 Posts: 206
|
|
Posted: Sun Jan 01, 2006 10:46 pm |
|
|
Thank you very much dyeatman, that work |
|
|
|