Following the documentation here http://q1.se/cdcemu/details.php i have come to the conclusion that it's not to hard to write a Arduino program for this, I just need a little help on the way whit it.
(I have programing knowledge from before i have done a few school projects whit embedded systems, also played around whit an accelerometer and printed out a DFT graph for a signal analysis course.)
According to the text we have the following pins i need:
Pin 1 = CD-C data line. (you need to transfer the bytes on this line) The TX on arduino
Pin 5 = RM Data (this line has data back from the head unit) The RX on arduino
Pin 4 = CD-C strobe (you need to send a 4us pulse after the first byte and last byte of packets) To a digital write on the arduino
Pin 2 = CD-C clock (you need to keep a 8uS clock signal on this line 4us on 4us off) a clock (of what type?).
And the transmission is "RS232 communication in 57600bps with RTS/CTS flow control, half duplex" adding up to a boud of 115200(i think) since "After an initial high(9ms) low(4.5ms) there follows a 32 bit sequence with a 0 encoded as 550us high,550us low and a 1 as 550us high,1.7ms low." would mean there is 2 symbols per bit right?
I guess using the pulseIn() - Arduino Reference pulseIn(RXPin,High) should do the trick for reading the RX signal.
And using digital write whit a delay for the TX, here im not sure what he ment whit "The changer to radio communication transfers the data in bytes msb first, the data is valid at the falling clock edge and a low pulse of one half clock period is sent after the first and the last byte of the transfer on the sync line..The clock period is around 8us." If some one could explain this to me i would be really happy.
And i don't have the "Most signifikant bit last" and "Least signifikant bit last" in code theory all figured out so i need some pointers on that as well.
Tl DR:
1.RS232 communication in 57600bps with RTS/CTS flow control, half duplex does this mean the baud rate is 115200 since there is 2 symbols per bit?
-
It needs a clock of 4 µs high and 4 µs low, What kind of timer would be best.
-
Upon writing to the radio "data is valid at the falling clock edge" i have no idea what he means by that could some one explain?
-
I don't have the "Most signifikant bit last" and "Least signifikant bit last" in code theory all figured out so i need some pointers on that as well.
-
Am I right to asume pulseIn(RXPin,High) should do the trick if "This remote control signal is pulse width modulated,the dataline is active high."