I am afraid if you post on this part of the forum you need to post in English. There is a Portuguese section or you could use Google Translate.
Could someone please help me !!
I have a Mega Arduino and need to send and receive TIC (Turbo Instrument Controller) commands and information, but I can not.
I have the tic serial communication manual, with the list of commands, but I can not send them through Arduino or receive the answers ..
I wanted to know if it is possible to do the Arduino serial communication with TIC!?
I looked at the manual you sent a link to. I could not find 'USB' in it, but it does mention RS232 and RS485. The Arduino has a serial link but it is not at RS232 voltage levels. Connecting RS232 directly to the Arduino will damage it. You need to use an RS232 or RS485 shield.
Sou nova no fórum, então não sabia que devia postar em inglês..
Já estou usando um conversor RS232 para TTL, para fazer a interface do TIC com o Arduino..
Estou tentando enviar os comandos utilizando Serial.print e quando leio a porta serial (Serial.read) recebo a mesma coisa que enviei, ao invés da resposta ao comando..
Já verifiquei que a velocidade e paridade do TIC e do Arduino são as mesmas.
Queria saber se tem outra maneira de enviar os comandos seriais para o TIC, sem ser Serial.print
If you are reading what you sent then either the TIC is echoing back the characters or the connecting cable is wrong.
The TIC expects a Carriage Return at the end of each command are you sure you are sending that character?
Do you have a PC with the TIC program on it, that would let you check out your cable?
int numero;
char letras;
void setup() {
Serial.begin (4800);
Serial1.begin (9600);
}
void loop() {
Serial1.print ("?V913");
Serial1.print('\r');
Serial.println("I sent the command ?V913");
delay(10);
if (Serial1.available() != 0) {
letras = Serial1.read();
// Serial.print(letras);
Serial.print("I read the character ; ");
Serial.println(letras);
delay(100);
}
}
Try the above.
The function 'loop' gets called again and again.
Each time round the loop your are sending the query "?V913\r" - the '\r' is the Carriage Return
However you are only reading one character of any reply from the TIC.
I am not always here but if I am I will try to answer.
If you get any characters back from the TIC then your cable is probably okay.
I don't understand though why, since you have the software, you cannot just use a PC and prove that the cable works.
Once you know for certain the cable is okay it eliminates another source of problems.
Your code is the main problem at the moment though.