1 slave 1 master 1 MAX232 1 problem ?
hi everybody i am trying to get numbers from PC in my circuit i have 1 slave 1 master and a MAX232 i can communicate pic to pic well there is no problem i can sent numbers to pc it is well too but when i am trying to get numbers from PC i have problem. i Try these
test var byte
TEST =0
loop:
hserin [test]
if test=4 then goto msj
if test=5 then goto msj2
msj:
hserout ["msj alındı",13,10]
goto loop
msj2:
hserout ["tamamdır",13,10]
goto loop
end
in here i try everything but when i sent the msj from pc i allways get "msj alındı" it means i cant use comparision.I know i can sent number from pc coz i try this code too.
test var byte
TEST =0
loop:
hserin [test]
hserout [#test,13,10]
goto loop
end
it send me back what i sent that means no circuit problem i have programming problem can anybody show me my problem and solition.?
Thanks Melanie now i understand.
Yes i have visual basic 6.0 professional now i understan what u mean.
Communication between pic and PC is a table of ASCII characters.I understand they re communicating not like as i think.For exmp when i am trying to sent 1 from pc to pic it sents 49 decimal number or 31 hex.If i try to compare numbers useing if i have to look 49 for 1 not look 1 then it will fail.
yes melanie but another how.
yes now i do the same.But i don't understan 1 think.Now i can sent 1 digit numbers how can i sent 2 digit numbers?
for example when i sent 15 it comes to pic 49 53.i try to use this code
HSERİN [STR test\2]
if test = 4953 then goto ok
goto loop
ok:
HSEROUT ["OK MAN U DID IT!",13,10]
goto loop
end
it will not work i know coz test is a byte that can't get numbers more than 255 if i make test a word PBP gives error i use str =string but it accepts charakters like a,b,c not numbers than what must i do ?
test var byte[2] means 2 value but how can i put 2 value to pic?
To my misunderstand friend Ralph
Ralph i learn electronic by my self.That means i really don't know what will i do when i have problem.I learn to read manuels and datasheet from this site.But some times i really can't find the answers.I am reading the manuels and try to make what i understand from the manuel.And all the manuels in english.In my first threads i wrote "My english is not good" if the manuels writen in Turkish may be i will understand better.In my dictionarys sometimes i can't find the translation of the thecnical words :( beleave me i really want to be a man who is not asking but can write some answers to the others.If u want to learn am i saying true or lie u can enter to the google and search my name "Burak Küçükdere".U will find some forum sites that i answer so many questions abouth Visual Basic.I am not a man who is asking free answers i always want to know what was my problem and how can i resolve.None of my questions re my homework :) you will see in the future i will become a man who is answering to the newbies who is learning pic basic or micros.