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

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

?? main.asm

?? Example_DUALADC_28pin CY3210-PSoCEVAL1 and CY3210-MiniEval1 Board Project
?? ASM
字號:
;;***********************************************************************************************
;;***********************************************************************************************
;;  FILENAME: main.asm
;;
;;  Version: 1.0, Updated on 27th July 2004
;;
;;  DESCRIPTION: Main file of Example_DUALADC_28pin example project
;;-----------------------------------------------------------------------------
;;  Copyright (c) Cypress MicroSystems 2000-2003. All Rights Reserved.
;;*****************************************************************************
;;*****************************************************************************
;
;***********************************************************************************************
;Example_DUALADC_28pin, a CY3210-PSoCEVAL1 and CY3210-MiniEval1 board project
;
;Project Objective:
;To demonstrate the operation of the 7-13 Bit variable DUALADC,Analog-to-Digital Converter
;user module of the PSoC microcontroller.A Programmable Gain Amplifier (PGA) with unity 
;gain and a LCD for display are also incorporated.
;
; Overview:
;The following changes were made to the default settings in the device editor.
; 
;    Select user modules
;        Select an DUALADC_1 module from the ADCs category
;        Select a PGA_1 module from the Amplifiers category
;        Select a PGA_2 module from the Amplifiers category
;        Select a LCD_1 module from the MiscDigital category   
;        in this example these UMs are renamed as DUALADC,PGAtoADC1,PGAtoADC2,LCD respectively. 
; 
;    Place user modules
;        1) select DUALADC,and then select the analog column 0(digital block
;           is fine with the default placement) and move ADC1 to block ASC10 to place it.
;           For placing ADC2 select analog column 1 and move ADC2 to block ASD11 to place it.
;           For digital block Placement details refer to the UM Datasheet.  
;        2) Select PGAtoADC1 and move it to block ACB00 to place it.
;        3) Select PGAtoADC2 and move it to block ACB01 to place it. 
;        4) Select LCD and select port_2 for LCD port.
; 
;
;Set the global resources and UM resources in the device editor window as shown in the project
;settings below.
;
;Upon program execution all hardware settings from the device configuration are loaded 
;into the device and main.asm is executed. The 24 MHz system clock is divided by 16 
;(VC1) to produce a 1.5MHz clock which is provided as the clock for DUALADC.For DUALADC,
;Once the DataClock is determined CalcTime is found by the relation 
;CalcTime>=DataClock*260/CPUClock,for this example DataClock is taken as 1.5MHz and 
;CPUClock as 12MHz to get a CalcTime of 32.5 Dataclocks.In the device editor this is set to 35.
;The input to ADC1 at P0[1] and input to ADC2 at P0[0]is sampled at approximately 46sps,
;Sample Rate=DataClock /((2^bits+2)+CalcTime).For the example DataClock is 1.5MHz and the 
;resolution is 13 Bits.
;
;By varying the dividers of VC1 and VC2 sample rates can be generated. The gain of the 
;amplifier feeding the input of the ADC is unity,and this is variable from 1/16 to 16. 
;
;Note:
;Apply the same clock from same source for both analog and digital blocks af ADC to make it work properly.
;More information is provided in the UM data sheet.
;
; Circuit Connections
;This example project runs on the CY3210-PSoCEVAL1 and CY3210-MiniEval1 boards or compatible 
;hardware.An analog input voltage is required on port_0_1, and port_0_0 and varying this voltage
;will cause value in the LCD to change.The voltage must not exceed Vcc by more than 0.5 volts as
;per the device specification.A PGA with unity gain is used just to route the analog input to ADC
;from port pin.
;
;The table below shows the translation of input analog voltage to digital for a signed output.
;
;DC voltage        Decimal value        Hexadecimal equivalent  
;     0                -4096                    F000      
;     1                -2458                    F666     
;     2                -820                     FCCC      
;     2.5              -1                       FFFF    
;     3                 819                     0333      
;     4                 2457                    0999
;     5                 4095                    0FFF
;
;(while verifying the negative values displayed using calculator,prefix the hexadecimal value 
;with F.for example,if the displayed value in the LCD is F666,in a 10 digit calculator enter 
;FFFFFFF666 and then convert to decimal to get -2458) 
;
;The table below shows the translation of input analog voltage to digital for a Unsigned output.
;
;DC voltage        Decimal value        Hexadecimal equivalent  
;     0                0                        0000      
;     1                1638                     0666     
;     2                3276                     0CCC      
;     2.5              4095                     0FFF    
;     3                4195                     1333      
;     4                6553                     1999
;     5                8191                     1FFF
;
; Project Settings:
;
;    Global resources
;        VC1            =    12                  ;divide 24MHz clock by 12
;        VC2            =    2                   ;divide VC1 by 2
;        RefMux         =    Vdd/2 +/- Vdd/2     ;This sets the ADC to use 2.5 volts for its
;                                                 zero reference (AGND) and measures signals 
;                                                 in a range that is 2.5 volts above and below AGND
;             
;        Analog Power   =    SC on/Ref High      ;This turns on the clock to the SC blocks  
;                                                 and sets the internal references for their best 
;                                                 performance. The power level can be reduced 
;                                                 once a project has been successfully developed.

;
;    DUALADC
;        Clock          =    VC1                 ;counter and analog block must have same clock
;        ADCResolution  =    13 Bits             ;can be selected from 7-13 bits 
;        ClockPhase     =    Norm                ;normal phase is the default
;        ADC Input1     =    P0[1]     
;        ADC Input2     =    P0[0]    
;        CalcTime       =    35                  ;obtained when integrate time selected as 20ms
;        DataFormat     =    signed              ;range between -4096 and 4095
;        ClockSync      =    Sync to SysClk 
;
;    AnalogColumn_Clock_0    =    VC1
;    AnalogColumn_Clock_1    =    VC1
;   
;    PGAtoADC1
;        AnalogBus      =    Disable             ;the output will not go to the analog output bus
;        Gain           =    1.000               ;set for unity gain
;        Input          =    AnalogColumn_Input_MUX_0    ;input is from column mux
;        Reference      =    AGND       
;
;    AnalogColumn_InputMUX_0    =    PORT_0_1  
;
;    PGAtoADC2
;        AnalogBus      = Disable                ;the output will not go to the analog output bus
;        Gain           = 1.000                  ;set for unity gain
;        Input          = AnalogColumn_Input_MUX_1;input is from column mux
;        Reference      = AGND       
;
;    AnalogColumn_InputMUX_1    =    PORT_0_0  
;
;    LCD
;        LCDPort        =    Port_2              ;Connect LCd to port2
;        BarGraph       =    Disabled 
;       
; Input:
;      
;    Pin        Select        Drive
;    P0[1]   AnalogInput   High Z analog
;    P0[0]   AnalogInput   High Z analog       
; Output:
;   
;    Port[2]-LCD port.For pins Default settings are made when LCD is connected to a port.
;   
;How to use this with the Proto board:
;
;For input Connect a Variable end of pot(R11) which is terminated at J5 in CY3210-PSoCEVAL1 board to 
;P0[1] using a jumper wire and for second ADC connect a variable source to P0[0]
;Connect LCD at J9 for output.
;
;For CY3210-MiniEval1 board variable end of a pot is readily connected to port_0_1.
;For second ADC connect a variable source to P0[0]
;Note:
;For CY3210-MiniEval1 board LCD connections are to be made on the Bread board.The following table 
;shows LCD connection for CY3210-MiniEval1 board:(dont forget to connect Vcc and ground to LCD and 
;for nominal contrast,ground contrast control pin of LCD through 1.5K resistor)
;
;port pins            LCD Pin 
; P2[0]  Connect to   LCD_D4
; P2[1]  Connect to   LCD_D5
; P2[2]  Connect to   LCD_D6
; P2[3]  Connect to   LCD_D7
; P2[4]  Connect to   LCD_E
; P2[5]  Connect to   LCD_RS 
; P2[6]  Connect to   LCD_RW

;-----------------------------------------------------------------------------
; Assembly main line
;-----------------------------------------------------------------------------

;-------------------------------------------------------------------
; Include Files
;-------------------------------------------------------------------
include "m8c.inc"                                ; part specific constants and macros
include "PSoCAPI.inc"                            ; PSoC API definitions for all User Modules
;-------------------------------------------------------------------
; String Constants
;-------------------------------------------------------------------
.LITERAL
    szDisplay1:ASCIZ "ADC-1"
    szDisplay2:ASCIZ "ADC-2"
.ENDLITERAL

export _main
;-----------------------------------------------------------------------------
;  FUNCTION NAME: Main
;
;  DESCRIPTION:
;     Main function. Performs system initialization,gets the data for display and loops infinitely.
;-----------------------------------------------------------------------------
;
;  ARGUMENTS:        None
;  RETURNS:          Nothing.
;  SIDE EFFECTS:     None.
;
;  THEORY of OPERATION or PROCEDURE:
;     1) Enable Global Interrupt
;     2) Start the user modules
;     3) Gets the data from ADC and displays the same on LCD
;     4) Loop Infinitely
_main:
 
    M8C_EnableGInt                               ; Enable interrupts
 
    call LCD_Start                               ; Initialize LCD  

    mov  A,PGAtoADC1_HIGHPOWER                   ; Start PGA with high power
    call PGAtoADC1_Start
 
    mov  A,PGAtoADC2_HIGHPOWER                   ; Start PGA with high power
    call PGAtoADC2_Start


    mov  A, DUALADC_HIGHPOWER                    ; Set Power and Enable A/D
    call DUALADC_Start
 
    mov  A, 00h                                  ; Start A/D in continuous sampling mode
    call DUALADC_GetSamples
 
; A/D conversion loop
_Loop1:
_Wait:                                           ; Poll until data is complete
    call DUALADC_fIsDataAvailable
    jz   _Wait
 
    call DUALADC_iGetData1ClearFlag              ; Get ADC1 Data (X=MSB A=LSB) and Reset flag
    push A                                       ; preserve ADC1 data in the stack
    push X                                       ; to use reg A & X for LCD positioning
 
    mov  A,00h
    mov  X,00h
    call LCD_Position                            ; position the cursor
 
    mov  A,>szDisplay1                           ; Load MSB part of pointer to ROM-based null  
                                                 ; terminated string.  
    mov  X,<szDisplay1                           ; Load LSB part of pointer to ROM-based null  
                                                 ; terminated string.  
    call LCD_PrCString                           ; Call function to display string at current  
                                                 ; LCD cursor position.  

    mov  A,01h                                   ; Load Row  
    mov  X,00h                                   ; Load Column  
    call LCD_Position                            ; position the cursor   
 
    pop  X                                       ; retrive ADC1 data
    pop  A
 
    call LCD_PrHexInt                            ; Print an Int in Hex to current LCD position
 
 
    call DUALADC_iGetData2ClearFlag              ; Get ADC2 Data (X=MSB A=LSB) and Reset flag
 
    push A                                       ; preserve ADC2 data in the stack
    push X                                       ; to use reg A & X for LCD positioning
 
    mov  A,00h
    mov  X,0Bh
    call LCD_Position                            ; position the cursor
 
    mov  A,>szDisplay2                           ; Load MSB part of pointer to ROM-based null  
                                                 ; terminated string.  
    mov  X,<szDisplay2                           ; Load LSB part of pointer to ROM-based null  
                                                 ; terminated string.  
    call LCD_PrCString                           ; Call function to display string at current  
                                                 ; LCD cursor position.  

 
    mov  A,01h                                   ; Load Row  
    mov  X,0Bh                                   ; Load Column  
    call LCD_Position                            ; Print an Int in Hex to current LCD position  
 
    pop  X                                       ; retrive ADC2 data
    pop  A
 
    call LCD_PrHexInt                            ; Print an Int in Hex to current LCD position

    jmp _Loop1

    ret

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
另类人妖一区二区av| 免费成人美女在线观看.| 亚洲bt欧美bt精品777| 国产精品中文欧美| 亚洲伊人色欲综合网| 黄网站免费久久| 欧美亚洲高清一区二区三区不卡| 337p粉嫩大胆色噜噜噜噜亚洲 | 欧美高清精品3d| 综合网在线视频| 国产九九视频一区二区三区| 欧美年轻男男videosbes| 成人欧美一区二区三区小说| 国产传媒日韩欧美成人| 精品美女在线播放| 日本成人在线网站| 欧美老年两性高潮| 午夜天堂影视香蕉久久| 色老汉一区二区三区| 专区另类欧美日韩| aa级大片欧美| 亚洲色图.com| 成人av在线看| 国产精品国产三级国产专播品爱网| 国产精品伊人色| 久久伊99综合婷婷久久伊| 青青草成人在线观看| 欧美一级欧美一级在线播放| 午夜在线成人av| 欧美日韩国产欧美日美国产精品| 亚洲一区二区三区四区在线观看 | 欧美高清一级片在线观看| 国产一区二区三区久久久| 欧美mv和日韩mv国产网站| 另类综合日韩欧美亚洲| 精品久久久久久亚洲综合网 | 国产欧美日韩另类一区| 国产高清不卡一区| 欧美国产精品劲爆| 91免费在线看| 性做久久久久久久免费看| 欧美手机在线视频| 日本不卡视频一二三区| 2020日本不卡一区二区视频| 国产成人精品三级麻豆| 国产精品不卡一区二区三区| 在线一区二区观看| 午夜不卡av免费| 欧美一级搡bbbb搡bbbb| 国产精品一区二区三区网站| 国产精品日日摸夜夜摸av| 色又黄又爽网站www久久| 亚洲一区免费视频| 日韩午夜小视频| 懂色av一区二区三区蜜臀| 亚洲激情图片一区| 欧美一区二区三区在| 岛国一区二区在线观看| 亚洲一区二区高清| 亚洲精品一区二区三区精华液 | 国产不卡在线播放| 18欧美乱大交hd1984| 欧美久久一区二区| 成人中文字幕在线| 午夜激情综合网| 国产欧美精品国产国产专区| 欧洲视频一区二区| 激情综合五月婷婷| 亚洲综合激情网| 欧美精品一区二区三区一线天视频| 成人av在线播放网站| 日本中文字幕不卡| 亚洲欧洲另类国产综合| 日韩三级av在线播放| 91在线无精精品入口| 奇米色一区二区| 一区二区三区精品在线观看| 久久久久久影视| 欧美猛男gaygay网站| 成人av电影免费在线播放| 麻豆精品在线播放| 亚洲欧美一区二区三区久本道91| 精品久久一区二区| 欧美在线三级电影| 99久久精品久久久久久清纯| 久久丁香综合五月国产三级网站| 亚洲乱码一区二区三区在线观看| 日韩欧美亚洲国产精品字幕久久久| av中文字幕亚洲| 国产大片一区二区| 九九**精品视频免费播放| 午夜久久久久久电影| 亚洲乱码中文字幕综合| 中文字幕乱码亚洲精品一区| 亚洲精品在线三区| 日韩一区二区精品| 欧美高清一级片在线| 欧美亚洲国产怡红院影院| 91视频一区二区| 成人性色生活片| 国产不卡视频在线观看| 国产精品99久久久久久有的能看| 日韩高清不卡在线| 日韩精品亚洲一区| 日韩精品高清不卡| 午夜精品久久久| 亚洲va国产va欧美va观看| 亚洲风情在线资源站| 亚洲午夜电影在线| 亚洲国产精品久久久久秋霞影院 | 久久久.com| 久久久久99精品国产片| 久久女同互慰一区二区三区| 欧美成人精品高清在线播放| 日韩三级伦理片妻子的秘密按摩| 日韩一区和二区| 精品福利在线导航| 国产亚洲1区2区3区| 国产精品人妖ts系列视频| 国产精品乱人伦| 综合欧美一区二区三区| 一区二区三区四区蜜桃| 亚洲风情在线资源站| 日本va欧美va瓶| 国产伦精一区二区三区| 成人av中文字幕| 在线看日韩精品电影| 69成人精品免费视频| 日韩精品一区二区三区三区免费| 欧美一区永久视频免费观看| 欧美成人a∨高清免费观看| 国产校园另类小说区| 国产精品乱码一区二区三区软件 | 日韩毛片一二三区| 一区二区三区小说| 美女性感视频久久| 懂色av一区二区夜夜嗨| 欧美自拍偷拍一区| 日韩精品一区二区三区三区免费| 国产丝袜欧美中文另类| 一区二区激情视频| 毛片一区二区三区| 成人黄色av电影| 在线成人小视频| 国产亚洲午夜高清国产拍精品| ●精品国产综合乱码久久久久| 午夜在线成人av| 国产电影精品久久禁18| 欧美色老头old∨ideo| 久久久国产精品麻豆| 亚洲综合丁香婷婷六月香| 韩国女主播一区| 在线观看三级视频欧美| 久久综合九色综合久久久精品综合 | 日韩国产在线观看| 国产精品99久久久久久久vr| 欧美午夜寂寞影院| 国产女同互慰高潮91漫画| 亚洲综合一区二区| 国产91在线观看丝袜| 欧美一区二区三区电影| 日韩毛片视频在线看| 国产在线视频一区二区三区| 欧美手机在线视频| 国产精品美女一区二区在线观看| 日本最新不卡在线| 欧美午夜精品久久久久久孕妇| 久久视频一区二区| 日韩成人免费电影| 91福利在线看| 国产精品二三区| 国产一级精品在线| 日韩欧美中文字幕精品| 亚洲国产欧美一区二区三区丁香婷| 精品国产乱码久久久久久1区2区 | 日本三级韩国三级欧美三级| 成人18视频日本| 久久久久99精品一区| 蜜桃av一区二区三区电影| 欧美影片第一页| 亚洲免费电影在线| 99久久精品免费观看| 国产目拍亚洲精品99久久精品| 久久av中文字幕片| 制服丝袜激情欧洲亚洲| 亚洲乱码国产乱码精品精可以看| 成人免费毛片片v| 国产片一区二区三区| 国产麻豆成人精品| 久久久国产综合精品女国产盗摄| 久久国内精品视频| 日韩一区二区免费在线观看| 石原莉奈在线亚洲三区| 欧美日韩国产免费一区二区| 亚洲高清视频中文字幕| 欧美日韩一区二区三区四区| 亚洲成人动漫在线免费观看| 欧美日韩另类国产亚洲欧美一级| 亚洲一区在线电影| 欧美日韩午夜在线|