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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? adc_ctrl.psm

?? PicoBlaze 處理器放大器和 A/D 轉(zhuǎn)換器控制器 展示了 Linear Technology LTC6912-1 可編程增益放大器和 Linear Technology LTC1407A 模
?? PSM
?? 第 1 頁 / 共 5 頁
字號:
                    CALL LCD_reset                      ;initialise LCD display
                    ;
                    ;Write welcome message to LCD display
                    ;
                    LOAD s5, 10                         ;Line 1 position 0
                    CALL LCD_cursor
                    CALL disp_PicoBlaze                 ;Display 'PicoBlaze Inside'
                    LOAD s5, 23                         ;Line 2 position 3
                    CALL LCD_cursor
                    CALL disp_ADC_Control
                    CALL delay_1s                       ;wait 5 seconds
                    CALL delay_1s
                    CALL delay_1s
                    CALL delay_1s
                    CALL delay_1s
                    CALL LCD_clear                      ;Clear display
                    ;
                    LOAD s0, 00                         ;clear event counter
                    STORE s0, sample_count
                    ;
                    ;
                    ;
                    ;
                    LOAD s0, 01                         ;set initial amplifier gain to 1 on both channels
                    STORE s0, amp_A_gain
                    STORE s0, amp_B_gain
                    JUMP new_gain_set                   ;set, display the initial gain and enable interrupts
                    ;
                    ;
                    ;The program is interrupt driven to maintain an 8KHz sample rate. The main body
                    ;of the program waits for an interrupt to occur. The interrupt updates all four
                    ;analogue outputs with values stored in scratch pad memory. This takes approximately
                    ;58us of the 125us available between interrupts. The main program then prepares
                    ;new values for the analogue outputs (in less than 67us) before waiting for the
                    ;next interrupt.
                    ;
                    ;
        warm_start: LOAD sF, FF                         ;flag set and wait for interrupt to be serviced
                    ENABLE INTERRUPT                    ;normal operation
          wait_int: INPUT sE, switch_port               ;test for button press changes to amplifier gain
                    TEST sE, BTN_north                  ;sE used as this in not effected by ISR
                    JUMP NZ, gain_increase
                    TEST sE, BTN_south
                    JUMP NZ, gain_decrease
                    COMPARE sF, FF                      ;wait for interrupt
                    JUMP Z, wait_int                    ;interrupt clears the flag
                    ;
                    ;
                    ;
                    ;Drive LEDs with simple binary count of the samples to indicate
                    ;that the design is active.
                    ;
                    FETCH s0, sample_count              ;increment counter
                    ADD s0, 01
                    STORE s0, sample_count
                    OUTPUT s0, LED_port                 ;count increments at 1Hz
                    ;
                    ;
                    ;Display the A/D Channel 0 value as hex on LCD
                    ;
                    LOAD s5, 2C                         ;Line 2 position 12
                    CALL LCD_cursor
                    FETCH s0, ADC0_msb
                    CALL disp_hex_byte
                    FETCH s0, ADC0_lsb
                    CALL disp_hex_byte
                    ;
                    ;
                    ;
                    ;Convert A/D channel 0 value to decimal voltage
                    ;
                    ;The 14-bit signed value from the A/D (sign extended to 16-bits)
                    ;relates to a voltage in the range -1.25v to +1.25v at the input
                    ;to the A/D converter relative to the 1.65v mid-rail reference point.
                    ;
                    ;The 14-bit value can be translated into the -1.25v to +1.25v using the
                    ;simple equation...
                    ;
                    ;   ADin = AD_value x 1.25/8192
                    ;
                    ;It is possible to scale the AD_value by 1.25/8192 using a fixed point
                    ;representation.
                    ;
                    ;However, it is also possible to scale it by another factor at the
                    ;same time which nicely converts to a binary value which is readily
                    ;converted to decimal. This can be achieved by example...
                    ;
                    ;For an input to the A/D converter of +1.25v relative to the reference,
                    ;the A/D will output the maximum conversion of 1FFF (+8191).
                    ;
                    ;In this case we would like to have the result value +1.250v which can be represented
                    ;by the integer value +1250 with appropiate positioning of the decimal point.
                    ;The constant to achieve this conversion is +1250/8191=+0.152606...
                    ;Also a number requiring fixed point representation but how many bits to use?
                    ;
                    ;The way to resolve this is to realise that a multiplication will be
                    ;performed and it would be nice if the +1250 result ended up in a register pair.
                    ;So if we perform a 16x16-bit multiplication such that the upper 16-bits of
                    ;the 32-bit result is the required value, then everything will resolve itself.
                    ;
                    ;Hence the constant required is actually (1250x(2^16))/8191=+10001 (2711 hex).
                    ;
                    ;Using the example 1FFF x 2711 = 04E1F8EF
                    ;   of which the upper 16-bits = 04E1 (+1249 decimal)
                    ;
                    ;Likewise the other limit case is E000 x 2711 = FB1DE000
                    ;   of which the upper 16-bits = FB1D (-1251 decimal)
                    ;
                    ;The values can be made perfect by rounding before truncation
                    ;
                    FETCH s2, ADC0_lsb                  ;Read A/D channel 0 value
                    FETCH s3, ADC0_msb
                    LOAD s0, 11                         ;scaling value for input to A/D converter
                    LOAD s1, 27
                    CALL mult_16x16s                    ;[s7,s6,s5,s4]=[s3,s2]x[s1,s0]
                    SL0 s5                              ;round value before truncation
                    ADDCY s6, 00
                    ADDCY s7, 00
                    ;
                    ;The register pair [s7,s6] now holds the binary value
                    ;representing the input level to the A/D converter in milli-volts.
                    ;This is now displayed on the LCD. Negative values need to be converted to
                    ;signed magnitude for display.
                    ;
                    LOAD s5, 20                         ;Line 2 position 0
                    CALL LCD_cursor
                    CALL disp_AD                        ;display A/D=
                    TEST s7, 80                         ;test sign bit of value
                    JUMP NZ, neg_AD
                    LOAD s5, character_plus
                    JUMP AD_sign
            neg_AD: XOR s6, FF                          ;complement [s7,s6] to make positive
                    XOR s7, FF
                    ADD s6, 01
                    ADDCY s7, 00
                    LOAD s5, character_minus
           AD_sign: CALL LCD_write_data                 ;display sign of value
                    CALL disp_volts                     ;display 4 digit value as X.XXXv
                    ;
                    ;Convert A/D channel 0 value to display the VINA decimal voltage
                    ;
                    ;The same fundamental technique can be used to convert the 14-bit
                    ;A/D value into the level at the VINA input except that two more factors
                    ;must be considered.
                    ;
                    ;The first is that the amplifier inverts and has gain. Therefore the
                    ;VINA input level is opposite polarity and could be a smaller deviation
                    ;from the mid rail 1.65v reference.
                    ;
                    ;Secondly, to display the actual voltage level at the VINA terminal
                    ;the 1.65v offset must be added.
                    ;
                    ;The voltage at the VINA input is therefore...
                    ;
                    ;   VINA = [AD_value x (1.25/(8192 x G))]+1.65
                    ;
                    ;Following the same methodology as for the A/D value, it means that there
                    ;is a set of scaling factors to deal with the negative gain values.
                    ;
                    ; K = (+1250 x (2^16)) / (8191 x G)
                    ;
                    ;        G             K     (K Hex)
                    ;       -1          -10001   (D8EF)
                    ;       -2           -5001   (EC77)
                    ;       -5           -2000   (F830)
                    ;      -10           -1000   (FC18)
                    ;      -20            -500   (FE0C)
                    ;      -50            -200   (FF38)
                    ;     -100            -100   (FF9C)
                    ;
                    FETCH s2, ADC0_lsb                  ;Read A/D channel 0 value
                    FETCH s3, ADC0_msb
                    FETCH s4, amp_A_gain                ;read A gain and select appropiate gain setting
                    LOAD s0, EF                         ;scaling value for amplifier gain of -1
                    LOAD s1, D8
                    COMPARE s4, 01
                    JUMP Z, mult_VINA
                    LOAD s0, 77                         ;scaling value for amplifier gain of -2
                    LOAD s1, EC
                    COMPARE s4, 02
                    JUMP Z, mult_VINA
                    LOAD s0, 30                         ;scaling value for amplifier gain of -5
                    LOAD s1, F8
                    COMPARE s4, 03
                    JUMP Z, mult_VINA
                    LOAD s0, 18                         ;scaling value for amplifier gain of -10
                    LOAD s1, FC
                    COMPARE s4, 05
                    JUMP Z, mult_VINA
                    LOAD s0, 0C                         ;scaling value for amplifier gain of -20
                    LOAD s1, FE
                    COMPARE s4, 06
                    JUMP Z, mult_VINA
                    LOAD s0, 38                         ;scaling value for amplifier gain of -50
                    LOAD s1, FF
                    COMPARE s4, 01
                    JUMP Z, mult_VINA
                    LOAD s0, 9C                         ;scaling value for amplifier gain of -100
                    LOAD s1, FF
         mult_VINA: CALL mult_16x16s                    ;[s7,s6,s5,s4]=[s3,s2]x[s1,s0]
                    SL0 s5                              ;round value before truncation
                    ADDCY s6, 00
                    ADDCY s7, 00
                    ADD s6, VREF_lsb                    ;add 1.65v offset represented at 1650 (0672 hex)
                    ADDCY s7, VREF_msb
                    ;
                    ;The register pair [s7,s6] now holds the binary value
                    ;representing the VINA input level in milli-volts.
                    ;This must be a positive value due to the offset of 1.65v
                    ;being greater than the maximum relative range of -1.25v to +1.25v.
                    ;This binary value can now be converted to a decimal digits
                    ;and displayed on the LCD.
                    ;
                    ;If the A/D value is maximum negative (E000) or maximum positive (1FFF)
                    ;then an indication of the actual value being applied being greater or
                    ;less than that computed will be made.
                    ;
                    LOAD s5, 17                         ;Line 1 position 7
                    CALL LCD_cursor
                    CALL disp_VA                        ;display VA=
                    FETCH s2, ADC0_lsb                  ;Read A/D channel 0 value
                    FETCH s3, ADC0_msb
                    COMPARE s3, E0                      ;test for maximum negative
                    JUMP NZ, test_max_pos
                    COMPARE s2, 00
                    JUMP NZ, test_max_pos
                    LOAD s5, character_greater_than     ;display >
                    CALL LCD_write_data
                    JUMP disp_VINA_volts
      test_max_pos: COMPARE s3, 1F                      ;test for maximum positive
                    JUMP NZ, disp_VINA_volts
                    COMPARE s2, FF
                    JUMP NZ, disp_VINA_volts
                    LOAD s5, character_less_than        ;display <
                    CALL LCD_write_data
   disp_VINA_volts: CALL disp_volts                     ;display 4 digit value as X.XXXv
                    JUMP warm_start

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品99久久久| 国产成a人亚洲| 国产精品成人一区二区三区夜夜夜| 91看片淫黄大片一级在线观看| 天天亚洲美女在线视频| 国产精品久久精品日日| 精品国产自在久精品国产| 久久综合久久综合久久| 欧美色欧美亚洲另类二区| 成人一区在线看| 精品在线一区二区三区| 性感美女久久精品| 亚洲精品v日韩精品| 国产精品视频一二三区| 欧美成人a∨高清免费观看| 欧美少妇一区二区| 色婷婷久久一区二区三区麻豆| 风间由美一区二区三区在线观看 | 亚洲成a人片在线观看中文| 国产精品午夜电影| 久久久青草青青国产亚洲免观| 欧美福利视频一区| 欧美午夜电影在线播放| 99精品视频一区二区三区| 丰满放荡岳乱妇91ww| 国产一区999| 国产乱人伦偷精品视频不卡| 精品综合免费视频观看| 日本不卡高清视频| 五月综合激情婷婷六月色窝| 亚洲一区二区三区四区的| 亚洲天堂免费看| 国产精品高潮久久久久无| 欧美国产一区视频在线观看| 久久一日本道色综合| 久久综合九色综合97婷婷女人 | 麻豆成人久久精品二区三区红| 亚洲.国产.中文慕字在线| 亚洲一区av在线| 一区二区三区不卡视频在线观看| 亚洲欧美日韩国产成人精品影院| 亚洲欧美另类图片小说| 亚洲女子a中天字幕| 艳妇臀荡乳欲伦亚洲一区| 亚洲成av人片在线观看无码| 三级久久三级久久| 热久久国产精品| 精品亚洲免费视频| 国产91精品免费| 99久久精品免费观看| 色乱码一区二区三区88| 欧美日韩精品一区二区在线播放| 91精品福利在线一区二区三区 | 国产成人精品亚洲午夜麻豆| 成人美女在线观看| 91麻豆文化传媒在线观看| 一本一本大道香蕉久在线精品 | 久久久不卡网国产精品二区| 国产欧美日韩激情| 亚洲欧美在线高清| 91免费视频网址| 日本精品免费观看高清观看| 精品1区2区3区| 日韩欧美亚洲国产另类| 欧美精品一区二区久久婷婷| 中文字幕欧美日韩一区| 亚洲精品国产成人久久av盗摄| 亚洲v精品v日韩v欧美v专区| 蜜桃免费网站一区二区三区| 国产成人精品aa毛片| 色综合久久天天| 欧美一区午夜视频在线观看 | 一区二区三区波多野结衣在线观看 | 69堂国产成人免费视频| 欧美精品一区二区高清在线观看| 日本一区二区高清| 亚洲国产一区二区三区 | 欧美最新大片在线看| 精品欧美久久久| 最新国产成人在线观看| 日韩成人一级片| jlzzjlzz亚洲日本少妇| 欧美一区午夜精品| ●精品国产综合乱码久久久久| 三级久久三级久久久| 国产白丝网站精品污在线入口| 在线影视一区二区三区| 久久综合成人精品亚洲另类欧美| 亚洲精品成人少妇| 国内精品伊人久久久久影院对白| www.欧美精品一二区| 欧美一级高清片| 一区二区三区免费| 福利一区二区在线| 日韩一区二区在线看| 亚洲免费av在线| 国产精品一级片在线观看| 在线不卡一区二区| 《视频一区视频二区| 激情小说亚洲一区| 欧美日韩精品综合在线| 亚洲三级在线播放| 国产美女在线观看一区| 欧美日韩高清一区| 一级做a爱片久久| 不卡视频在线看| 久久影音资源网| 人人精品人人爱| 精品视频一区 二区 三区| 中文字幕五月欧美| 国产在线不卡一卡二卡三卡四卡| 在线不卡免费av| 亚洲一区二区精品3399| 91在线国产观看| 日本一区二区综合亚洲| 激情亚洲综合在线| 日韩精品一区二区三区中文不卡| 午夜国产不卡在线观看视频| 日本韩国欧美在线| 亚洲欧美日韩国产另类专区| bt欧美亚洲午夜电影天堂| 欧美韩国日本一区| 国产精品香蕉一区二区三区| 精品处破学生在线二十三| 日韩av网站免费在线| 在线播放中文一区| 视频一区在线视频| 欧美日韩成人综合天天影院| 亚洲一区二区三区四区在线观看| 国产精品乱子久久久久| 高清av一区二区| 国产女主播视频一区二区| 国产乱码字幕精品高清av| 欧美精品一区二区在线播放| 国产尤物一区二区在线 | 亚洲电影一区二区| 欧美视频在线一区二区三区| 亚洲最新视频在线观看| 欧美中文一区二区三区| 亚洲图片欧美一区| 欧美日韩国产中文| 日本欧美一区二区三区| 精品久久国产老人久久综合| 久久99久久99| 国产欧美日韩激情| 99久久国产综合精品色伊| 一区二区在线看| 欧美久久婷婷综合色| 奇米影视一区二区三区| 精品国产一区二区三区忘忧草| 国产真实乱偷精品视频免| 久久久国产午夜精品| 99国产精品视频免费观看| 亚洲在线免费播放| 91精品国产综合久久福利软件 | 国产另类ts人妖一区二区| 久久精品亚洲国产奇米99| 成人国产精品免费观看| 亚洲免费毛片网站| 欧美一区二区三区在线观看视频| 激情伊人五月天久久综合| 国产精品天干天干在观线| 日本精品裸体写真集在线观看 | 蜜臀久久99精品久久久画质超高清 | 久久先锋影音av鲁色资源| www.亚洲国产| 亚洲第一福利一区| 久久综合国产精品| 日本高清不卡视频| 毛片av一区二区三区| 国产精品视频麻豆| 欧美理论电影在线| 国产成人午夜99999| 亚洲香肠在线观看| 国产日韩欧美综合一区| 在线视频一区二区三| 国产真实乱对白精彩久久| 亚洲猫色日本管| 精品粉嫩aⅴ一区二区三区四区| 9l国产精品久久久久麻豆| 日韩精品成人一区二区三区| 国产婷婷色一区二区三区四区 | 精品国产三级电影在线观看| 99国产精品久久久久| 蜜臀a∨国产成人精品| 中文字幕一区在线观看| 日韩视频在线永久播放| 91丨国产丨九色丨pron| 国内久久婷婷综合| 亚洲高清一区二区三区| 国产农村妇女毛片精品久久麻豆 | 中文字幕在线播放不卡一区| 日韩一区二区三区视频在线观看| 91丨porny丨在线| 国产精品夜夜爽| 日韩不卡手机在线v区| 亚洲欧洲精品一区二区三区不卡| 日韩三级在线观看| 欧美在线高清视频| 成人黄页在线观看|