In my previous topic http://arduino.cc/forum/index.php/topic,123839.0.html i tried to make serial transmission without timers and interruptions. Looking to previos link i was sending data and writing on ports through delayMicroseconds(x) function. I got many troubles since code it's not time uniform and i was not getting the correct data on the receiving end. I had so many troubles that i have to change the approach.. :(
My setup is: 1x arduino UNO transmits data using MAnchester coding 1x arduino on the receiving end that listens port, gets all bits in an save in variable data. What would it be the easiest, reliable and fast solution to send and receive data?
if data = 0x34 for example i want pinX to be 0011 0100 timed correctly between writes ... So, if i had a signal with 50kHz the time between each write should be 20us.
I have no trouble setting up ISR Timer to generate interrupts every xx us. What i have trouble to understand is how to make ISR write the data that i want without missing a bit...
I'm so confused, lacking solutions..and desperate at the same time because this is part of a project that is close to an end. Every help is appreciated.
Thank you for support, Fernando Oliveira