Witam forumowiczow,
Mam malutki problem z implementacja protokolu komunikacji radia ze zmieniarka....
Ale od poczatku:
Znam interwaly impulsow generalnie caly protokol jest opisany.
Cytuj:
There are three different bit identifiers
Start bit: It consists of a 9ms high phase followed by a 4.5ms low phase.
0-Bit: A bit with a value of 0, is represented by an equal-long high and low phase. The length is in each case 0.55 ms. The bit thus has a total length of 1.1 ms.
1 bit: A bit with a value of 1, represents a 0.55 ms long high pulse followed by a 1.7 ms low phase. The total length is therefore 2.25 ms.
A command consists of 4 bytes, whereby in my interpretation the LSB (least significant bit) of each byte is sent first.
1st byte: always CA hex.
2nd byte: always 34 hex.
3. Byte: The command which is evaluated.
4. Byte: Again the command with inverted bit.
The bit sequence "01010011 00101100 01111000 10000111" can be seen in the figure above. This corresponds to the hexadecimal representation "CA 34 1e e1". In this case, the radio has indicated that the next track should be played.
Posiadam rowniez kod napisany na Atmega8 ale niestety jest nie kompatybilny z Atmega328 albo ja cos robie zle ...
język c
Musisz się zalogować, aby zobaczyć kod źródłowy. Tylko zalogowani użytkownicy mogą widzieć kod.
Generalnie nie potrzebuje poprawienia spi wysylki i odbierania bo to juz mam i dziala poprawnie bardzie martwi mnie ISR(INT0_vect) oraz deklaracje rejestrow/Timerow.
Moja wiedza na temat C w AVR jest slaba ale ciagle czytam i sie szkole ale na tym poleglem nie potrafie tego sportowac, lub napisac od zera.
Przepraszam za brak pl znaczkow.
Dziekuje za kazda informacje, naprowadzenie na wlasciwy trop.
Pozdrawiam
Piotr
P.S.
Panie Mirku dzieki za Eclipsa