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

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

?? dac_ctrl.psm

?? 環境ISE
?? PSM
?? 第 1 頁 / 共 3 頁
字號:
                  ;KCPSM3 Program - SPI Control of D/A converter on Spartan-3E Starter Kit.
                  ;
                  ;
                  ;Ken Chapman - Xilinx Ltd
                  ;
                  ;Version v1.00 - 24th November 2005
                  ;
                  ;This program uses an 8KHz interrupt to generate test waveforms on the
                  ;4 analogue outputs provided by the Linear Technology LTC2624 device.
                  ;
                  ;As well as the port connections vital to communication with the UART and the SPI
                  ;FLASH memory, there are additional port connections used to disable the other
                  ;devices sharing the SPI bus on the Starter Kit board. Although these could have been
                  ;controlled at the hardware level, they are included in this code to aid
                  ;future investigations of communication with the other SPI devices using PicoBlaze.
                  ;
                  ;Connections to the LEDs, switches and press buttons are provided to aid
                  ;development and enable further experiments. Otherwise know as having fun!
                  ;
                  ;Port definitions
                  ;
                  ;
                  CONSTANT SPI_control_port, 08   ;SPI clock and chip selects
                  CONSTANT SPI_sck, 01            ;                  SCK - bit0
                  CONSTANT SPI_rom_cs, 02         ;    serial rom select - bit1
                  CONSTANT SPI_spare_control, 04  ;                spare - bit2
                  CONSTANT SPI_amp_cs, 08         ;     amplifier select - bit3
                  CONSTANT SPI_adc_conv, 10       ;          A/D convert - bit4
                  CONSTANT SPI_dac_cs, 20         ;           D/A select - bit5
                  CONSTANT SPI_amp_shdn, 40       ;       amplifier SHDN - bit6
                  CONSTANT SPI_dac_clr, 80        ;            D/A clear - bit7
                  ;
                  CONSTANT SPI_output_port, 04    ;SPI data output
                  CONSTANT SPI_sdo, 80            ;   SDO - bit7
                  ;
                  CONSTANT SPI_input_port, 01     ;SPI data input
                  CONSTANT SPI_sdi, 80            ;             SDI - bit7
                  CONSTANT SPI_amp_sdi, 40        ;   amplifier SDI - bit6
                  ;
                  ;
                  CONSTANT LED_port, 80           ;8 simple LEDs
                  CONSTANT LED0, 01               ;     LED 0 - bit0
                  CONSTANT LED1, 02               ;         1 - bit1
                  CONSTANT LED2, 04               ;         2 - bit2
                  CONSTANT LED3, 08               ;         3 - bit3
                  CONSTANT LED4, 10               ;         4 - bit4
                  CONSTANT LED5, 20               ;         5 - bit5
                  CONSTANT LED6, 40               ;         6 - bit6
                  CONSTANT LED7, 80               ;         7 - bit7
                  ;
                  ;
                  CONSTANT switch_port, 00        ;Read switches and press buttons
                  CONSTANT BTN_north, 01          ;  Buttons     North - bit0
                  CONSTANT BTN_east, 02           ;               East - bit1
                  CONSTANT BTN_south, 04          ;              South - bit2
                  CONSTANT BTN_west, 08           ;               West - bit3
                  CONSTANT switch0, 10            ;  Switches        0 - bit4
                  CONSTANT switch1, 20            ;                  1 - bit5
                  CONSTANT switch2, 40            ;                  2 - bit6
                  CONSTANT switch3, 80            ;                  3 - bit7
                  ;
                  ;
                  ;
                  ;
                  ;Special Register usage
                  ;
                  ;
                  ;Useful data constants
                  ;
                  ;
                  ;Constant to define a software delay of 1us. This must be adjusted to reflect the
                  ;clock applied to KCPSM3. Every instruction executes in 2 clock cycles making the
                  ;calculation highly predictable. The '6' in the following equation even allows for
                  ;'CALL delay_1us' instruction in the initiating code.
                  ;
                  ; delay_1us_constant =  (clock_rate - 6)/4       Where 'clock_rate' is in MHz
                  ;
                  ;Example: For a 50MHz clock the constant value is (10-6)/4 = 11  (0B Hex).
                  ;For clock rates below 10MHz the value of 1 must be used and the operation will
                  ;become lower than intended.
                  ;
                  CONSTANT delay_1us_constant, 0B
                  ;
                  ;
                  ;
                  ;
                  ;
                  ;
                  ;Scratch Pad Memory Locations
                  ;
                  ;Values to be written to the D/A converter
                  ;
                  ;
                  CONSTANT chan_A_lsb, 00         ;Channel A value LS-Byte
                  CONSTANT chan_A_msb, 01         ;                MS-Byte
                  ;
                  CONSTANT chan_B_lsb, 02         ;Channel B value LS-Byte
                  CONSTANT chan_B_msb, 03         ;                MS-Byte
                  ;
                  CONSTANT chan_C_lsb, 04         ;Channel C value LS-Byte
                  CONSTANT chan_C_msb, 05         ;                MS-Byte
                  ;
                  CONSTANT chan_D_lsb, 06         ;Channel D value LS-Byte
                  CONSTANT chan_D_msb, 07         ;                MS-Byte
                  ;
                  ;
                  ;Value used to synthesise a triangle wave
                  ;
                  CONSTANT triangle_up_down, 08   ;Determines up or down slope
                  ;
                  ;Value used to synthesise a square wave
                  ;
                  CONSTANT square_count, 09       ;Counts samples in square wave
                  ;
                  ;
                  ;Values used to synthesise a sine wave
                  ;
                  CONSTANT sine_y_lsb, 10         ;Sine wave value LS-Byte
                  CONSTANT sine_y_msb, 11         ;                 MS-Byte
                  CONSTANT sine_y1_lsb, 12        ;Sine wave delayed LS-Byte
                  CONSTANT sine_y1_msb, 13        ;                  MS-Byte
                  CONSTANT sine_k_lsb, 14         ;Sine constant LS-Byte
                  CONSTANT sine_k_msb, 15         ;              MS-Byte
                  ;
                  ;
                  ;Sample counter used to give activity indication on LEDs
                  ;
                  CONSTANT sample_count_lsb, 20   ;16-bit counter LS-Byte
                  CONSTANT sample_count_msb, 21   ;               MS-Byte
                  ;
                  ;Initialise the system
                  ;
                  ;
      cold_start: CALL SPI_init                   ;initialise SPI bus ports
                  CALL init_sine_wave             ;initialise sine wave synthesis values
                  CALL delay_1s                   ;bus settling delay
                  LOAD s0, 00                     ;clear all internal D/A values
                  STORE s0, chan_A_lsb
                  STORE s0, chan_A_msb
                  STORE s0, chan_B_lsb
                  STORE s0, chan_B_msb
                  STORE s0, chan_C_lsb
                  STORE s0, chan_C_msb
                  STORE s0, chan_D_lsb
                  STORE s0, chan_D_msb
                  STORE s0, triangle_up_down      ;initial slope is up
                  CALL dac_reset                  ;reset D/A converter on all channels
                  ENABLE INTERRUPT                ;Interrupts define 8KHz sample rate
                  ;
                  ;
                  ;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
        wait_int: COMPARE sF, FF
                  JUMP Z, wait_int                ;interrupt clears the flag
                  ;
                  ;
                  ;Channel A is a square wave of 2KHz.
                  ;
                  ;This is formed from the 2KHz square wave on channel C and demonstrates that the
                  ;D/A converter echoes the previously sent 32-bit command word.
                  ;
                  ;Following the interrupt service routine (ISR), the register set [s9,s8,s7,s6]
                  ;will contain the command which was last sent for the setting of channel C. The
                  ;12-bit sample value is extracted from this word and stored in the location for
                  ;channel A. This should mean that channel A is one sample behind channel C. In this
                  ;version that does not mean a lag of 90 degrees because each output is updated
                  ;sequentially and that takes approximatly 14.5us per channel.
                  ;
                  ;This will also demonstrate that the reference voltage on channels A and B is 3.3v
                  ;compared with 2.5v on channels C and D. So whilst the square wave on channel C is
                  ;set for 0.50v to 2.00v, it should be 0.66v to 2.64v on channel A.
                  ;
                  SR0 s7                          ; shift 12-bit value right 4 places
                  SRA s6
                  SR0 s7
                  SRA s6
                  SR0 s7
                  SRA s6
                  SR0 s7
                  SRA s6
                  STORE s7, chan_A_msb            ;store value for D/A output
                  STORE s6, chan_A_lsb
                  ;
                  ;
                  ;
                  ;
                  ;Channel B is a triangle waveform of 200Hz.
                  ;
                  ;Given the sample rate of 8KHz, there are 40 samples per waveform period.
                  ;To achieve close to full scale deflection, the waveform needs to increase or
                  ;decrease by 204 each sample so that over the first 20 samples it rises from
                  ;0 to 4080 and then over the next 20 samples it reduces back to zero.
                  ;
                  FETCH s0, chan_B_lsb            ;load current value into [s1,s0]
                  FETCH s1, chan_B_msb
                  FETCH s2, triangle_up_down      ;read current slope direction
                  COMPARE s2, 00                  ;determine current direction
                  JUMP NZ, slope_down
                  ADD s0, CC                      ;add 204 (00CC hex) to current value
                  ADDCY s1, 00
                  COMPARE s1, 0F                  ;test for peak value of 4080 (0FF0 hex)
                  JUMP NZ, store_channel_B
                  COMPARE s0, F0
                  JUMP NZ, store_channel_B
                  LOAD s2, 01                     ;change to slope down next time
                  STORE s2, triangle_up_down
                  JUMP store_channel_B
      slope_down: SUB s0, CC                      ;subtract 204 (00CC hex) from current value
                  SUBCY s1, 00
                  COMPARE s1, 00                  ;test for zero (0000 hex)
                  JUMP NZ, store_channel_B
                  COMPARE s0, 00
                  JUMP NZ, store_channel_B
                  LOAD s2, 00                     ;change to slope up next time
                  STORE s2, triangle_up_down

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产午夜亚洲精品不卡| 国产欧美精品日韩区二区麻豆天美| 韩国精品久久久| 一区二区三区在线观看国产| 26uuuu精品一区二区| 欧美久久免费观看| 91在线精品一区二区| 国产乱理伦片在线观看夜一区| 亚洲高清免费在线| 亚洲精品视频在线| 欧美激情一区三区| 精品久久久久久久久久久久包黑料 | 亚洲男人的天堂一区二区| 欧美第一区第二区| 欧美三级日韩在线| 91免费看`日韩一区二区| 国产成人av在线影院| 青娱乐精品视频在线| 亚洲地区一二三色| 亚洲精品国产高清久久伦理二区| 国产三级精品在线| 亚洲大型综合色站| 亚洲精品一二三四区| 国产精品久久久久久亚洲伦| www一区二区| 日韩精品一区二区三区视频 | 成人高清视频在线| 国产精品夜夜嗨| 精品一二三四区| 九色porny丨国产精品| 日本欧美韩国一区三区| 五月综合激情网| 亚洲韩国一区二区三区| 亚洲精品国产无天堂网2021| 亚洲日本乱码在线观看| 亚洲少妇最新在线视频| 亚洲色图另类专区| 亚洲日本电影在线| 亚洲蜜桃精久久久久久久| 亚洲人精品午夜| 亚洲激情五月婷婷| 樱花草国产18久久久久| 亚洲精品成人少妇| 亚洲综合成人网| 亚洲一区二区精品久久av| 亚洲国产乱码最新视频| 亚洲午夜电影在线观看| 石原莉奈一区二区三区在线观看| 午夜精品一区二区三区电影天堂| 图片区小说区区亚洲影院| 美女一区二区视频| 国产精品自在在线| 波多野结衣中文字幕一区 | 精品一区二区日韩| 韩国中文字幕2020精品| 国产91精品久久久久久久网曝门 | 91精品国产乱码| 精品国内二区三区| 久久久国际精品| 日韩理论在线观看| 天堂蜜桃一区二区三区 | 日韩精品最新网址| 精品国产乱码久久久久久久| 欧美国产日韩亚洲一区| 一区二区在线观看视频| 日韩高清中文字幕一区| 国产98色在线|日韩| 91免费看视频| 欧美mv日韩mv亚洲| 亚洲色图欧洲色图| 久久精品国产成人一区二区三区| 国产精品一卡二卡在线观看| 色欧美日韩亚洲| 欧美xxxxx裸体时装秀| 亚洲欧洲99久久| 日本中文字幕一区二区视频| 国产剧情一区二区| 欧美三日本三级三级在线播放| 日韩欧美一区二区视频| 亚洲三级理论片| 美女脱光内衣内裤视频久久影院| 99久久精品情趣| 欧美一区二区三区思思人| 亚洲国产成人在线| 亚洲国产精品久久人人爱| 国产一区高清在线| 欧美三级韩国三级日本一级| 国产三级一区二区三区| 亚洲v中文字幕| proumb性欧美在线观看| 日韩午夜在线影院| 一区二区三区高清| 国产精品18久久久久久久久| 欧美男女性生活在线直播观看| 国产欧美日韩中文久久| 丝袜美腿亚洲综合| 成人午夜大片免费观看| 日韩精品中文字幕一区| 亚洲国产一二三| 大胆欧美人体老妇| 日韩欧美一级精品久久| 亚洲国产sm捆绑调教视频| 国产不卡一区视频| 精品久久一二三区| 亚洲亚洲人成综合网络| 99精品视频在线观看免费| 欧美精品一区二区三区一线天视频 | 日韩欧美另类在线| 亚洲风情在线资源站| 91网站在线播放| 国产欧美日韩三级| 韩国中文字幕2020精品| 91精品国产色综合久久ai换脸| 亚洲免费资源在线播放| 成人av资源在线| 国产日韩欧美高清在线| 黄色日韩三级电影| 日韩欧美高清在线| 日本美女一区二区三区视频| 欧美日精品一区视频| 一区二区三区中文字幕| 99免费精品在线观看| 欧美激情在线一区二区| 国产成人免费在线| 久久久久99精品国产片| 国产一区在线看| 337p粉嫩大胆色噜噜噜噜亚洲 | 国产盗摄女厕一区二区三区| 精品福利在线导航| 久久99国产精品麻豆| 精品日韩在线一区| 韩国精品久久久| 国产午夜精品福利| 国产精品18久久久| 中文字幕av一区二区三区| 成人h动漫精品| 成人一区二区三区中文字幕| 亚洲国产经典视频| 成+人+亚洲+综合天堂| 日韩一区在线看| 一本大道久久a久久综合| 亚洲激情六月丁香| 欧美日韩欧美一区二区| 视频一区免费在线观看| 精品久久久久久久久久久久久久久| 久88久久88久久久| 日本一区二区三区国色天香 | 国产日韩欧美在线一区| 国产91综合一区在线观看| 中文在线一区二区 | 国产亚洲欧美日韩在线一区| 国产毛片精品视频| 亚洲欧洲99久久| 欧美日韩国产首页| 奇米影视一区二区三区小说| 久久一区二区三区四区| 粉嫩一区二区三区性色av| 亚洲精品美腿丝袜| 制服.丝袜.亚洲.中文.综合| 美国十次了思思久久精品导航| 精品国产sm最大网站| 成人影视亚洲图片在线| 亚洲在线视频网站| 日韩三级视频在线看| 国产精品18久久久久久vr| 亚洲视频一区二区在线| 制服丝袜中文字幕一区| 国产精品系列在线观看| 亚洲精品亚洲人成人网在线播放| 在线成人av影院| 国产精品99久久久久久久vr| 亚洲免费视频中文字幕| 欧美成人a∨高清免费观看| 成人免费视频视频| 午夜影视日本亚洲欧洲精品| 欧美精品一区二区三区视频| 91丨porny丨首页| 老司机精品视频导航| 亚洲欧美激情视频在线观看一区二区三区 | 色妞www精品视频| 蜜桃一区二区三区在线观看| 国产精品网友自拍| 67194成人在线观看| 国产凹凸在线观看一区二区| 天天色综合成人网| 国产精品入口麻豆原神| 欧美日韩dvd在线观看| 福利一区二区在线| 奇米四色…亚洲| 一区二区成人在线视频| 欧美国产日韩一二三区| 欧美一卡二卡三卡| 99re视频这里只有精品| 奇米影视一区二区三区小说| 亚洲免费伊人电影| 亚洲国产成人私人影院tom| 91麻豆精品国产综合久久久久久| 99久久99久久精品免费观看| 8x8x8国产精品| 99精品欧美一区|