亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? main.c

?? 32位計數器的計數程序
?? C
字號:
//*****************************************************************************
//*****************************************************************************
//  FILENAME: main.c
//   Version: 1.0, Updated on 27 July 2004
//
//  DESCRIPTION: Main file of the Example_Counter32_28Pin Project.
//
//-----------------------------------------------------------------------------
//  Copyright (c) Cypress MicroSystems 2000-2003. All Rights Reserved.
//*****************************************************************************
//*****************************************************************************

/*
//----------------------------------------------------------------------------
Project Objective
    To demonstrate the operation of the Counter32 user module of the PSoC microcontroller.  

    NOTE: OPTIONAL C COMPILER IS REQUIRED TO BUILD THIS PROJECT Compiler license is 
    available     for purchase from http://www.onfulfillment.com/cypressstore/ 
    or your local distributor.

Overview
    A 32 bit Counter module is configured as a Pulse Width Modulator (PWM).  The width of 
    the pulse is increased every second and is output to an LED.

    Upon program execution all hardware settings from the device configuration are loaded 
    into the device and main.c is executed. The 24 MHz system clock is directly fed as input 
    to the Counter32 user module.  (Note: Even though the input clock is VC1, this won't be 
    taken as input as the ClockSync parameter is set as Use SysClk Direct, which is 24 MHz).  
    The period of the Counter module is 24000000 (23999999+1), which produces a TerminalCount 
    output after every second.   The Compare value of the counter is initially set to 2400000 
    (ie., 1/10th the period) and increased by 2400000 every second at the TerminalCount ISR, 
    resulting in gradual increase in pulse width every second.  The Compare value is reset 
    once it cross the period value (ie., after 10 seconds).

    The Counter starts counting down from the period value. The CompareOut will be low till 
    such time the Counter value is greater than or equal to Compare value.  Once the Counter 
    value goes below Compare value, the CompareOut goes high.

Project Settings

    Global resources        - No change

    Counter32_Timer
        Clock             = VC1                 Not used, because ClockSync
                                                is set as Use SysClk Direct.
        Enable            = High                Enabled for continuous operation.
        CompareOut        = Row_0_Output_0      Routed thru GlobalOutEven_0
        TerminalCountOut  = None                Not used
        Period            = 23999999            Set to 23999999 and count down to 0.
        CompareValue      = 2400000             1/10th of Period initially.
                                                (increased in code at every    
                                                terminal count).
        CompareType       = Less Than           Once the Counter value is Less
                                                than Compare Value, then drive 
                                                the CompareOut output high.
        InterruptType     = Terminal Count      To generate interrupt after
                                                the count reaches 0.
        ClockSync         = SyncToSysClk        The 24 MHz system clock is
                                                selected as the input clock 
                                                overriding the "Clock" parameter.
        TC_PulseWidth     = Full width          Generate a full pulse width
                                                at every terminal count.
        InvertEnable      = Normal              Not used
    
Input 
    None    
Output
    P0[0]        -    Strong, GlobalOutEven_0
    
How to use this with the Proto board

    CY3210-PSoCEVAL1
        - Connect a wire between P2[0] and LED1 

    CY3210-MiniEval1
        - In JP1, 1 and 2 to be connected  (for 28pin operation)

//----------------------------------------------------------------------------
*/

//-------------------------------------------------------------------
// Include Files
//-------------------------------------------------------------------
#include <m8c.h>        // part specific constants and macros
#include "PSoCAPI.h"    // PSoC API definitions for all User Modules

//-------------------------------------------------------------------
// C Interrupt Handlers
//-------------------------------------------------------------------
#pragma interrupt_handler Counter32_ISR_C()

//-------------------------------------------------------------------
// Variable Allocation
//-------------------------------------------------------------------
DWORD     dNewCompareValue;

//-----------------------------------------------------------------------------
//  FUNCTION NAME: Main
//
//  DESCRIPTION:
//      Main function. Performs system initialization and loops infinitely.
//      
//-----------------------------------------------------------------------------
//
//  ARGUMENTS:        None
//  RETURNS:          Nothing.
//  SIDE EFFECTS:     None.
//
//  THEORY of OPERATION or PROCEDURE:
//    1) Enable Interrupts of user modules and Global Interrupt
//    2) Initialise the compare value (for minimum period)
//    3) Loop infinitely
//
void main()
{
    //Enable Global Interrupt
    M8C_EnableGInt;                            
    
    //Enable the counter
    Counter32_EnableInt();                    
    //Start the counter
    Counter32_Start();                        
     
    //set the initial compare value
    dNewCompareValue = 2400000;                
    
    //Infinite loop. Processing done only at Counter32_ISR_C
    while(1);
}

//-----------------------------------------------------------------------------
//  FUNCTION NAME: Counter32_ISR_C
//
//  DESCRIPTION:
//      Interrupt Service routine of Counter32 usermodule written in C.
//      The _Counter32_ISR subroutine In the Counter32INT.asm file, 
//      redirects the flow to this subroutine.
//-----------------------------------------------------------------------------
//
//  ARGUMENTS:        None
//  RETURNS:          Nothing.
//  SIDE EFFECTS:     None.
//
//  THEORY of OPERATION or PROCEDURE:
//        This ISR is serviced on every Termincal count (ie., every second)
//        The pulse width increased by adjusting the Compare value of the Counter
//
void Counter32_ISR_C()
{    
    //increase the compare value one step so that the pulse width increases
    dNewCompareValue = dNewCompareValue + 2400000;        
    
    //if the the compare value crosses period value, then reset it.
    if ( dNewCompareValue > 24000000 )                    
        dNewCompareValue = 2400000;                        
        
    //Update the new compare value into the Counter       
    Counter32_WriteCompareValue(dNewCompareValue);        
														
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
综合中文字幕亚洲| 麻豆精品久久精品色综合| 亚洲aⅴ怡春院| 国产成人av在线影院| 91精品久久久久久久久99蜜臂| 国产精品天美传媒| 免费高清成人在线| 欧美视频精品在线| 亚洲视频狠狠干| 成人激情开心网| 国产欧美日韩麻豆91| 国内精品伊人久久久久av影院 | 国产精品福利一区| 久久狠狠亚洲综合| 7777女厕盗摄久久久| 亚洲在线中文字幕| 99久久免费国产| 国产精品免费久久| 国产一区二区久久| 欧美精品一区二区三| 免费不卡在线观看| 在线播放中文一区| 日韩影视精彩在线| 67194成人在线观看| 亚洲第一成年网| 欧美日韩久久一区二区| 一区二区在线观看免费视频播放| 国产成人在线视频免费播放| 精品999久久久| 国内精品免费**视频| 久久综合中文字幕| 国产一区二区三区国产| 久久精品亚洲国产奇米99| 国产精品一区二区久激情瑜伽 | 波多野结衣的一区二区三区| 国产午夜精品一区二区三区嫩草| 国产乱码精品一区二区三区忘忧草| 精品久久99ma| 国产一区二区电影| 中文字幕 久热精品 视频在线| 国产成人精品www牛牛影视| 中文字幕免费在线观看视频一区| 成人app下载| 亚洲精品成人在线| 欧美丰满少妇xxxbbb| 久久av中文字幕片| 国产女主播一区| 在线欧美日韩国产| 日韩电影免费一区| 国产午夜亚洲精品不卡| 99免费精品在线观看| 亚洲午夜在线观看视频在线| 欧美一区二区性放荡片| 国产一区久久久| 成人免费一区二区三区在线观看| 日本电影欧美片| 免费成人在线观看| 国产欧美久久久精品影院| 日本高清成人免费播放| 毛片av中文字幕一区二区| 亚洲国产精品二十页| 欧美日韩综合色| 国产伦精品一区二区三区在线观看| 亚洲人成影院在线观看| 91精品国产手机| 9l国产精品久久久久麻豆| 亚洲va国产天堂va久久en| 久久新电视剧免费观看| 欧美亚洲动漫制服丝袜| 国产成人综合在线播放| 亚洲综合免费观看高清完整版在线 | 99久久精品99国产精品| 日韩激情一二三区| 国产精品麻豆99久久久久久| 欧美精品色综合| av午夜精品一区二区三区| 日本在线不卡一区| 亚洲视频一区在线| 精品久久久久久久久久久久久久久 | 久久精品国产久精国产| 国产精品理伦片| 欧美tickling网站挠脚心| 99精品久久久久久| 国产精品一区2区| 日韩综合一区二区| 国产精品美女久久久久久久| 欧美变态口味重另类| 精品视频999| 99re亚洲国产精品| 国产69精品久久久久毛片| 日本vs亚洲vs韩国一区三区二区| 亚洲人成亚洲人成在线观看图片| www欧美成人18+| 欧美一区二区在线观看| 在线播放中文一区| 欧美偷拍一区二区| 91久久国产综合久久| 不卡的av在线播放| 成人性视频网站| 国产一区二区三区在线观看免费 | 欧美精品日日鲁夜夜添| 日本高清不卡aⅴ免费网站| 成人高清视频在线| 成人精品电影在线观看| 成人国产精品免费| 波多野结衣视频一区| kk眼镜猥琐国模调教系列一区二区| 国产一区二区福利视频| 国产在线一区二区| 国产精品一区久久久久| 国产精品99久久久久久宅男| 精品一区二区在线播放| 激情文学综合丁香| 国产一区在线精品| 韩国av一区二区三区四区| 久草热8精品视频在线观看| 老司机午夜精品99久久| 蜜桃av一区二区| 狠狠狠色丁香婷婷综合激情| 国产在线一区二区| 丰满白嫩尤物一区二区| 99re这里只有精品6| 91成人看片片| 欧美精品v国产精品v日韩精品| 91精品国产高清一区二区三区蜜臀| 欧美另类高清zo欧美| 日韩午夜激情av| 久久久久国产精品麻豆ai换脸| 国产日韩欧美精品一区| 亚洲丝袜自拍清纯另类| 亚洲一区二区三区四区的 | 一区av在线播放| 亚洲aaa精品| 激情成人午夜视频| aaa欧美大片| 欧美日韩你懂的| 精品999在线播放| 国产精品二区一区二区aⅴ污介绍| 最新不卡av在线| 首页亚洲欧美制服丝腿| 国产一区二区三区最好精华液| av在线一区二区三区| 欧美久久久久免费| 国产人成一区二区三区影院| 亚洲精品免费在线| 日韩av电影天堂| 成人免费看的视频| 91 com成人网| 国产精品无人区| 午夜精品久久久久久久蜜桃app | 日本欧美一区二区在线观看| 国产激情一区二区三区| 欧美丝袜丝交足nylons| 精品粉嫩超白一线天av| 亚洲嫩草精品久久| 老司机精品视频一区二区三区| 成人av综合在线| 制服丝袜国产精品| 亚洲丝袜自拍清纯另类| 久久电影国产免费久久电影| 色综合一个色综合亚洲| 久久综合九色综合97_久久久| 亚洲永久免费av| 成人美女在线观看| 欧美大片一区二区| 一区二区在线观看不卡| 国产精品亚洲综合一区在线观看| 欧美日韩高清一区二区| 亚洲欧洲国产日韩| 国产美女主播视频一区| 777久久久精品| 亚洲一区精品在线| 91丝袜高跟美女视频| 久久香蕉国产线看观看99| 三级影片在线观看欧美日韩一区二区| aaa亚洲精品一二三区| 久久无码av三级| 久久机这里只有精品| 欧美精品一卡二卡| 亚洲国产毛片aaaaa无费看| 99久久777色| 国产精品乱人伦| 国产乱码一区二区三区| 久久综合色综合88| 美女免费视频一区| 4438x成人网最大色成网站| 亚洲成人精品一区| 欧美影视一区二区三区| 一区二区三区.www| 色成年激情久久综合| 中文字幕在线一区二区三区| 国产成人无遮挡在线视频| 久久久久久免费| 国产精品亚洲午夜一区二区三区| 日韩欧美成人一区二区| 九一九一国产精品| 久久这里只有精品首页| 国产乱子轮精品视频| 国产免费久久精品| 波多野结衣亚洲一区|