rs232 and pic
OK, I need have the caracter from pc, I send from pc az 234 and send too el 34 for example. I want in my pic, when read az 234, put the vaiable az in 234, and when read el 34 put the variable in 34 into the pic. For example. The antenna horizontal are in az 100º and send from my pc az 258º, in this moment the pic may move the antenna at az 258º ok. The problem is I don´t know 5 or 6 caracters from pc.
my program part.
DEFINE HSER_RCSTA 90h
DEFINE HSER_TXSTA 20h
DEFINE HSER_BAUD 2400
DEFINE HSER_SPBRG 25
DEFINE LOADER_USED 1
DEFINE LCD_DREG PORTC
DEFINE LCD_DBIT 0
DEFINE LCD_RSREG PORTC
DEFINE LCD_RSBIT 4
DEFINE LCD_EREG PORTC
DEFINE LCD_EBIT 5
DEFINE LCD_BITS 4
...
....
MAIN:
LCDOUT $FE,1
LCDOUT I,$85,"TRACKING"
LCDOUT I,LINEA2," AZIMUT ELEVACION"
LCDOUT I,$99,734,I,$A3,734
INICIO:
Hserin 1,INICIO1,[cad] HERE NEED READ 5 OR 6 CARACTERS
INICIO1:
GOSUB LEEANALOGICAS
LCDOUT I,LINEA4,cad," # ",#cad,"Hex ",hex cad
IF cad= 1 THEN GOSUB MENU
IF cad= 2 THEN GOSUB park
IF cad= 3 THEN GOSUB COMUNICACION
.....
-.....
...
tHANK YOU VERY MUCH
aguere@mail.com