main.c
来自「MSP430f2013 ADC, LCD drivers using 7416」· C语言 代码 · 共 70 行
C
70 行
/*=============================================================================
// File : main.c //
// //
// Abstract: This source file containing the main calling sub routines //
// Compiler : IAR Embedded Work Bench //
// //
// Author : Kuberappa.M.Sajjan //
// E-mail : kuber@unifiedst.com //
// //
// //
=============================================================================*/
/*--------------------------- Preprocessor Directives -----------------------*/
#include "io430.h"
#include "datatypes_v1.1.h"
#include "lcd_v1.1.h"
#include "adc_v1.1.7.h"
#include "conversion_v1.1.7.h"
/*-------------------------- Macros and Constants ---------------------------*/
const UCHAR strng[5] = "LT="; // This indicates that the direction of the wt
const UCHAR stn[5] = "RT="; // This indicates that the direction of the wt
/*--------------------------- Global variable Declarations ------------------*/
/*-------------------------- Function Prototypes ----------------------------*/
int main( void )
{
WDTCTL = WDTPW + WDTHOLD; // Stop the watch dog timer
system_initialisation(); // Initialise the system and its peripherals
__enable_interrupt(); // Enable the global Interrupt bit
lcd_displaydata(ROW1,COL1,strng); // Display the LT Direction
lcd_displaydata(ROW2,COL1,stn); // Display the RT Direction
system_offset_adc_conv(OFFSET); // read the offset values
while(1)
{
system_offset_adc_conv(READ); // Read the weights on the Platform
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?