Thank you Koepel for your answer ![]()
Right, its a good idea to use the attachInterrupt() and I will try it , but I think it doesn't solve the problem. I only use the Serialmonitor to see which Bit was send and which was received, but I don't like it neither. At the reset of the transmitter, I get normaly more ones I want. For example: 15 in binary looks like: B00001111 but I receive a 31 --> B00011111 and after a few cycles of restart, I get different numbers (I told the transmitter to send only 15...), first 31, then 31, 63, 62, 62, I don't know why. I've set the delay to 1000ms but nothing changed
I'm new at programming with the Arduino IDE and don't know really much functions and methodes, but I know the registers a little bit and how to use bitMath and portmanipulation, for example its not necessary to use the lowPower libary or in that case the PinCahngeInt. I try to use as little as possible libarys in my sketches, only for bigger projects with LCDs or WiFi modules. It's only an experiment to get more knowledge about bus systems.=)
Can you explain what bitWrite() means, I don't understand...
The idea behind this sketch was the SN74HC595. You write data to one wire and push it into the register with the second wire. The latch in my example is the "8" -bit long number (its like UART --> baudrate = 9600, you have to set transmitter and receiver to the same speed)
Yes, the Data always going in one direction and right, it is a mix of SPI and UART.