Receving information through serial port
Ok let me try and explain the project I'm working on. I have a javelin stamp demo board with a ds1620 connected to it. That is constantly sending data over the serial port to a VB terminal i have coded. The VB terminal displays the current temp and also sounds an alarm when my preset High and low thresholds are exceeded. I also have it set so that the javelin takes x number of samples of the temp and then reports the average temp. this is to eliminate the alarm from sounding if a spike in temperature occurs suddenly.
the problem I am having is when i try and send over the settings. I cant figure out how to make it so that the javelin stores the right values for each one of the settings. I can send a high threshold of 50 for example and it stores it fine. but any time i try to make it say 105 it moves the "5" down to the next setting. it seems incapable of storing anything with 1 digit or 3.
say for example im sending a High Threshold (HT)of 105, a Low threshold( LT)of 60 it would report it as HT 10 and LT 56
I cant seem to fix it.
I hooked up an LCD to my board just to verify that the numbers where being sent and no matter what I try i cant get it to work any help would be appreciated.
I attached a copy of my java code if you would like to see the vb code as well just ask
the problem I am having is when i try and send over the settings. I cant figure out how to make it so that the javelin stores the right values for each one of the settings. I can send a high threshold of 50 for example and it stores it fine. but any time i try to make it say 105 it moves the "5" down to the next setting. it seems incapable of storing anything with 1 digit or 3.
say for example im sending a High Threshold (HT)of 105, a Low threshold( LT)of 60 it would report it as HT 10 and LT 56
I cant seem to fix it.
I hooked up an LCD to my board just to verify that the numbers where being sent and no matter what I try i cant get it to work any help would be appreciated.
I attached a copy of my java code if you would like to see the vb code as well just ask
Comments
I will try to help you [noparse];)[/noparse]
I'm also using a DS1620 and here is what I'm using to display the temperature:
charBuff definition:
This code display the temperature on the LCD screen and also on the console with XML format. Then I retreive it on a compture for storage.
Hope it helps.
JM