Maxim MAX6675 Cold-Junction-Compensated K-Thermocoupleto-Digital Converter (0°C to +1024°C) os2 and os5
Dependents: proyectoprueba3 proyectoRTOS proyectoRTOS2 proyectoRTOS ... more
Revision 2:74731b8476a0, committed 2020-04-27
- Comitter:
- star297
- Date:
- Mon Apr 27 06:43:19 2020 +0000
- Parent:
- 0:7c1c768af92a
- Commit message:
- update
Changed in this revision
| max6675.cpp | Show annotated file Show diff for this revision Revisions of this file |
| max6675.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/max6675.cpp Thu May 09 22:17:49 2019 +0000
+++ b/max6675.cpp Mon Apr 27 06:43:19 2020 +0000
@@ -5,8 +5,9 @@
max(NC, miso, sclk), _cs(cs)
{
max.format(16,1); // set 16 bit SPI format
- max.frequency(4000000);
+ max.frequency(400000);
}
+
float max6675::gettemp(int cf)
{
float temp = 0;
--- a/max6675.h Thu May 09 22:17:49 2019 +0000
+++ b/max6675.h Mon Apr 27 06:43:19 2020 +0000
@@ -36,13 +36,14 @@
public:
max6675(PinName miso, PinName sclk, PinName cs);
-
+
// read temperature 0 Centigrade, 1 Fahrenheit
float gettemp(int cf);
private:
SPI max;
- DigitalOut _cs;
+ DigitalOut _cs;
+ Timer t;
};
#endif