EDIT w nocy umknęło mi kilka szczegółów więc poprawiłem, mam nadzieje że coś poradzicie.
Witam ponownie, Ja znów z problemem
![Bardzo szczęśliwy :D](https://forum.atnel.pl/images/smilies/icon_e_biggrin.gif)
otóż do większego projektu potrzebuję obsługiwać 2 max31855.
uruchomiłem to na szybko na arduino pomijając fakt że termopara nie zgrywała sie z max'em ale zmieniłem wzmocnienie + mały shift i woda gotuje się w 100C a zlewka z lodem ~1-3, pokojowa natomiast jest na internal i TC taki sam.
Wracając do meritum:
Całość musi być uruchomiona na STM32F103 toteż przerobiłem bibliotekę od wyświetlacza dotykowego i wartości różnią się od tych z arduino
poniżej biblioteka
język c
Musisz się zalogować, aby zobaczyć kod źródłowy. Tylko zalogowani użytkownicy mogą widzieć kod.
część main.c
język c
Musisz się zalogować, aby zobaczyć kod źródłowy. Tylko zalogowani użytkownicy mogą widzieć kod.
terminal z arduino
Kod:
stat: 0
internal: 29.19
temperature: 28.28
stat: 0
internal: 29.31
temperature: 29.72
stat: 0
internal: 29.31
temperature: 29.00
stat: 0
internal: 29.31
temperature: 29.00
stat: 0
internal: 29.31
temperature: 29.00
stat: 0
internal: 29.31
temperature: 29.00
stat: 0
internal: 29.31
temperature: 29.36
stat: 0
internal: 29.31
temperature: 29.72
stat: 0
internal: 29.31
temperature: 29.36
internal: 29.00
temperature: 28.64
stat: 0
internal: 29.00
temperature: 28.64
stat: 0
internal: 29.06
temperature: 28.28
stat: 0
internal: 29.06
temperature: 28.64
stat: 0
internal: 29.06
temperature: 28.28
stat: 0
internal: 29.06
temperature: 27.92
stat: 0
internal: 29.06
temperature: 28.64
stat: 0
internal: 29.06
temperature: 28.28
stat: 0
internal: 29.06
temperature: 28.64
stat: 0
internal: 29.12
temperature: 28.28
stat: 0
internal: 29.12
temperature: 28.28
stat: 0
internal: 29.12
temperature: 29.00
stat: 0
internal: 29.12
temperature: 28.64
stat: 0
internal: 29.06
temperature: 28.64
stat: 0
internal: 29.06
temperature: 28.64
stat: 0
internal: 29.06
temperature: 28.64
stat: 0
internal: 29.06
temperature: 28.64
stat: 0
internal: 29.06
temperature: 28.64
stat: 0
internal: 29.06
temperature: 28.28
stat: 0
internal: 29.06
temperature: 28.64
stat: 0
internal: 29.00
temperature: 29.00
stat: 0
internal: 28.94
temperature: 28.64
stat: 0
internal: 28.94
temperature: 29.00
stat: 0
internal: 28.87
temperature: 28.28
stat: 0
internal: 28.87
temperature: 27.92
stat: 0
internal: 28.87
temperature: 28.28
stat: 0
internal: 28.87
temperature: 28.64
stat: 0
internal: 28.87
temperature: 27.92
stat: 0
internal: 28.87
temperature: 28.28
stat: 0
internal: 28.81
temperature: 28.64
stat: 0
internal: 28.81
temperature: 28.64
stat: 0
internal: 28.81
temperature: 28.64
stat: 0
internal: 28.81
temperature: 28.64
stat: 0
internal: 28.75
temperature: 28.64
stat: 0
internal: 28.75
temperature: 28.28
stat: 0
internal: 28.75
temperature: 28.64
stat: 0
internal: 28.69
temperature: 28.64
stat: 0
internal: 28.69
temperature: 28.28
stat: 0
internal: 28.75
temperature: 28.28
stat: 0
internal: 28.75
temperature: 27.92
stat: 0
internal: 28.75
temperature: 28.28
stat: 0
internal: 28.81
temperature: 27.92
stat: 0
internal: 28.75
temperature: 28.28
stat: 0
internal: 28.81
temperature: 28.28
stat: 0
internal: 28.81
temperature: 28.28
stat: 0
internal: 28.81
temperature: 28.64
stat: 0
internal: 28.81
temperature: 28.28
stat: 0
internal: 28.81
temperature: 28.28
stat: 0
internal: 28.81
temperature: 28.28
stat: 0
internal: 28.81
temperature: 28.28
stat: 0
internal: 28.75
temperature: 27.92
stat: 0
internal: 28.81
temperature: 28.28
stat: 0
internal: 28.81
temperature: 27.92
stat: 0
internal: 28.81
temperature: 28.28
stat: 0
internal: 28.87
temperature: 27.92
stat: 0
internal: 28.87
temperature: 28.28
stat: 0
internal: 28.87
temperature: 28.28
stat: 0
internal: 28.87
temperature: 28.28
stat: 0
internal: 28.87
temperature: 28.28
stat: 0
internal: 29.06
temperature: 28.28
stat: 0
internal: 29.00
temperature: 28.64
stat: 0
internal: 29.06
temperature: 28.64
ramka z arduino
Wartość poprawna dla ostatnich 14 bitów 127(niekorzystanie ze standardowego 0,25 u mnie jest 0,36-16)
![Obrazek](http://forum.atnel.pl/_obrazki/o/thumb/1096/56c7d10ff39ac61d5870761c6eb6ed20.png)
ramka z max'a i wyświetlacza dotykowego
zdjęcie pokazuje że prawidłowo przebiega inicjacja między 2 slave'ami
![Obrazek](http://forum.atnel.pl/_obrazki/o/thumb/1096/84022bbf2205c6993386d68d1c03e15a.png)
Ramka z stm sam max
Wartość pomiaru z analizatora i wyświetlacza : 26137
![Obrazek](http://forum.atnel.pl/_obrazki/o/thumb/1096/0cb363acf1ac8decdd61a0d8d5e211d2.png)
I tak .... na arduino temperatura w akademika to 29 stopni(internal i TC)
na STM32 na internal było 25 a na tc 1200 z tą małą jedną różnica że jak odłączałem SS to 25 z internal znikało pojawiało się 0 a ten 1200 z TC stało twardo tak więc jak by coś te zmienną nadpisywało. Kurcze siedzę po nocach i tupie w miejscu .
Może jest tu chętny pomóc
![Bardzo szczęśliwy :D](https://forum.atnel.pl/images/smilies/icon_e_biggrin.gif)
za każde nawet najdrobniejsze komentarze dziękuję