• 大小: 256KB
    文件类型: .rar
    金币: 2
    下载: 1 次
    发布日期: 2021-05-31
  • 语言: 其他
  • 标签:

资源简介

PIC18单片机 官方示例所有程序 包含AD TIMER0123 USART 等

资源截图

代码片段和文件信息

#include 
#include 

#if defined (ADC_V1) || defined (ADC_V2) || defined (ADC_V3) ||\
    defined (ADC_V4) || defined (ADC_V5) || defined (ADC_V6) ||\
defined (ADC_V7) ||defined (ADC_V7_1) || defined (ADC_V8) ||\
defined (ADC_V10) || defined (ADC_V11) || defined (ADC_V12) ||\
defined (ADC_V13) || defined (ADC_V13_1) || defined (ADC_V11_1)\
|| defined (ADC_V13_2) || defined (ADC_V13_3)|| defined (ADC_V14)\
|| defined (ADC_V14_1) || defined (ADC_V14_2) || defined (ADC_V14_3)
/*************************************************************************************
Function:       char BusyADC(void)

Overview:    This function returns the ADC conversion status

Parameters:  None

Returns:        If the value of GO is ?? then ??is returnedindicating that the
           ADC is busy in conversion. If the value of GO is ?? then ??is
                      returned indicating that the ADC has completed conversion.

Remarks:     This function returns the complement of the ADCON0  bit
                     status which indicates whether the ADC is busy in conversion.
            
***************************************************************************************/
char BusyADC(void)
{
  return(ADCON0bits.GO);
}

#elif defined (ADC_V9) || defined (ADC_V9_1)
/*************************************************************************************
Function:       char BusyADC(void)

Overview:    This function returns the ADC conversion status.  

Parameters:  None

Returns:        If the value of GO is ?? then ??is returnedindicating that the
           ADC is busy in conversion. If the value of GO is ?? then ??is 
                      returned indicating that the ADC has completed conversion. 

Remarks:     This function returns the complement of the ADCON0  bit
                     status which indicates whether the ADC is busy in conversion.
            
***************************************************************************************/
char BusyADC(void)
{
  WDTCONbits.DEVCFG = 0;  
  return(ADCON0bits.GO);
}

#elif defined (ADC_V15) || defined (ADC_V15_1)
/*************************************************************************************
Function:    char BusyADC10(void)

Overview:    This function returns the ADC conversion status.  

Parameters:  None

Returns:     If the value of DONE is ?? then ??is returnedindicating that the
             ADC is busy in conversion.If the value of DONE is ?? then ??is 
             returned indicating that the ADC has completed conversion. 

Remarks:     This function returns the complement of the ADCON1L  bit
             status which indicates whether the ADC is busy in conversion.
            
***************************************************************************************/  
char BusyADC(void)
{
  return(ADCON1Lbits.DONE);
}

#endif



 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       2987  2013-10-02 20:43  plib\ADC\adcbusy.c

     文件       2398  2013-10-02 20:43  plib\ADC\adcclose.c

     文件       2283  2013-10-02 20:43  plib\ADC\adcconv.c

     文件      10350  2013-10-02 20:43  plib\ADC\adcopen.c

     文件       1945  2013-10-02 20:43  plib\ADC\adcread.c

     文件       3269  2013-10-02 20:43  plib\ADC\adcselchconv.c

     文件       1749  2013-10-02 20:43  plib\ADC\adcsetch.c

     文件       7687  2013-10-02 20:43  plib\ancom\close_ancomp.c

     文件      32390  2013-10-02 20:43  plib\ancom\open_ancomp.c

     文件       1269  2013-10-02 20:43  plib\CAN2510\CANbmod.c

     文件       1999  2013-10-02 20:43  plib\CAN2510\CANenabl.c

     文件       1476  2013-10-02 20:43  plib\CAN2510\CANenabl.h

     文件       2555  2013-10-02 20:43  plib\CAN2510\canerrst.c

     文件       2823  2013-10-02 20:43  plib\CAN2510\canfilts.c

     文件       2580  2013-10-02 20:43  plib\CAN2510\canfiltx.c

     文件       3901  2013-10-02 20:43  plib\CAN2510\canfms.c

     文件       3927  2013-10-02 20:43  plib\CAN2510\canfmx.c

     文件      17649  2013-10-02 20:43  plib\CAN2510\caninit.c

     文件        821  2013-10-02 20:43  plib\CAN2510\caninte.c

     文件        360  2013-10-02 20:43  plib\CAN2510\canints.c

     文件       1411  2013-10-02 20:43  plib\CAN2510\canloads.c

     文件       2755  2013-10-02 20:43  plib\CAN2510\canloadx.c

     文件       1226  2013-10-02 20:43  plib\CAN2510\canlrtrs.c

     文件       2623  2013-10-02 20:43  plib\CAN2510\CANLrtrX.c

     文件        676  2013-10-02 20:43  plib\CAN2510\canmasks.c

     文件       1920  2013-10-02 20:43  plib\CAN2510\canmaskx.c

     文件        513  2013-10-02 20:43  plib\CAN2510\canmoder.c

     文件        291  2013-10-02 20:43  plib\CAN2510\canmodes.c

     文件       5029  2013-10-02 20:43  plib\CAN2510\canread.c

     文件        794  2013-10-02 20:43  plib\CAN2510\canready.c

............此处省略450个文件信息

评论

共有 条评论