mzapatasilva wrote:I am working with a Compass that communicates via AF_softserial with the Arduino, and a PC (usb laptop) that talks to Arduino too, and I am running into some timings problems too.
My suggestion is to check if an external UART bufferd, will make your code more simple, and your circuit more robust. This way you don´t have to take care of timings.
mzapatasilva, could you post up some sample code please. Does your compass use RTS CTS lines as well or not?
What is a "UART buffered"?
//rutine related to the server , I use 10, because of the baudrate that I am using
void ReturnPC(byte valor)
I use this code along my programm to send data form the Arduino to the laptop through a MAxim485 that requieres a RTS line that I have attached to pinEnable.
UART o USART could be an internal or stand alone IC that takes care of serial asynchronous comunications, leting the Microcontroler do other tasks meanwhile.
Pins 0 and 1 are using a UART internal on the Arduino, ut all other pins are using Microcontroler time or resources.
The Arduino Diecimila has a number of facilities for communicating with a computer, another Arduino, or other microcontrollers. The ATmega168 provides UART TTL (5V) serial communication, which is available on digital pins 0 (RX) and 1 (TX) REFERENCE:http://www.arduino.cc/en/Main/ArduinoBoardDiecimila