找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 2823|回复: 0
收起左侧

MAX31855热电偶转换器开发流程

[复制链接]
ID:695384 发表于 2020-4-25 16:42 | 显示全部楼层 |阅读模式
一、  准备硬件和相关知识
1.   硬件:一块开发板、逻辑分析仪、热电偶(常用的K型热电偶)、杜邦线等;

16.png
2.   相关知识:VHDL基础、SPI通信;

二、  max31855datasheet编程用到的部分:
   1.电路连接图
15.png


2.串行接口时序特性
4.png

3 .串口时序
5.png

4.引脚分配
6.png

5.热电偶温度格式
17.png


三、程序编写
/**
******************************************************************************
  * @file           : max31855.c
  * @brief          : MAX31855 cold-junction compensated thermocouple-to-digital
  *                   converter program body.
  ******************************************************************************
  *
  * All rights reserved.
  *
******************************************************************************
  */
/* Includes ------------------------------------------------------------------*/
#include "max31855.h"
#include "stm32f1xx_hal.h"
/* External variables --------------------------------------------------------*/
SPI_HandleTypeDef hspi1;
/* Private variables ---------------------------------------------------------*/
float tcTemp = 0, cjTemp = 0;
bool tcError = false;
/* Private function prototypes -----------------------------------------------*/                                
/**
  * @brief Delay about 11ns per NOP (72MHz*1.25MIPS/MHz=90MIPS)
  * @param None
  * @retval None
  */
static void SPI_Delay(uint32_t counter)
{
  for(int i=0; i<counter; i++)
  {
    __NOP();
  }
}
      ………………………………………………
四、编程中注意的问题
把握时序图,严格核准。
五、订货选型
1587804047523.jpg

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|51黑电子论坛 |51黑电子论坛6群 QQ 管理员QQ:125739409;技术交流QQ群281945664

Powered by 单片机教程网

快速回复 返回顶部 返回列表