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

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

?? auto_pwm.psm

?? EDA原理及VHDL實現(何賓教授)
?? PSM
?? 第 1 頁 / 共 3 頁
字號:
                 JUMP go_down_loop
                 ;
                 ;**************************************************************************************
                 ; UART communication routines
                 ;**************************************************************************************
                 ;
                 ; Read one character from the UART
                 ;
                 ; Character read will be returned in a register called 'UART_data'.
                 ;
                 ; The routine first tests the receiver FIFO buffer to see if data is present.
                 ; If the FIFO is empty, the routine waits until there is a character to read.
                 ; As this could take any amount of time the wait loop could include a call to a
                 ; subroutine which performs a useful function.
                 ;
                 ;
                 ; Registers used s0 and UART_data
                 ;
 read_from_UART: INPUT s0, status_port               ;test Rx_FIFO buffer
                 TEST s0, rx_data_present            ;wait if empty
                 JUMP NZ, read_character
                 JUMP read_from_UART
 read_character: INPUT UART_data, UART_read_port     ;read from FIFO
                 RETURN
                 ;
                 ;
                 ;
                 ; Transmit one character to the UART
                 ;
                 ; Character supplied in register called 'UART_data'.
                 ;
                 ; The routine first tests the transmit FIFO buffer to see if it is full.
                 ; If the FIFO is full, then the routine waits until it there is space.
                 ;
                 ; Registers used s0
                 ;
   send_to_UART: INPUT s0, status_port               ;test Tx_FIFO buffer
                 TEST s0, tx_full                    ;wait if full
                 JUMP Z, UART_write
                 JUMP send_to_UART
     UART_write: OUTPUT UART_data, UART_write_port
                 RETURN
                 ;
                 ;
                 ;
                 ;**************************************************************************************
                 ; Text messages
                 ;**************************************************************************************
                 ;
                 ;
                 ; Send Carriage Return to the UART
                 ;
        send_CR: LOAD UART_data, character_CR
                 CALL send_to_UART
                 RETURN
                 ;
                 ; Send a space to the UART
                 ;
     send_space: LOAD UART_data, character_space
                 CALL send_to_UART
                 RETURN
                 ;
                 ;
                 ;
                 ; Send 'PicoBlaze Servo Control' string to the UART
                 ;
   send_welcome: CALL send_CR
                 CALL send_CR
                 LOAD UART_data, character_P
                 CALL send_to_UART
                 LOAD UART_data, character_i
                 CALL send_to_UART
                 LOAD UART_data, character_c
                 CALL send_to_UART
                 LOAD UART_data, character_o
                 CALL send_to_UART
                 LOAD UART_data, character_B
                 CALL send_to_UART
                 LOAD UART_data, character_l
                 CALL send_to_UART
                 LOAD UART_data, character_a
                 CALL send_to_UART
                 LOAD UART_data, character_z
                 CALL send_to_UART
                 LOAD UART_data, character_e
                 CALL send_to_UART
                 CALL send_space
                 LOAD UART_data, character_A
                 CALL send_to_UART
                 LOAD UART_data, character_u
                 CALL send_to_UART
                 LOAD UART_data, character_t
                 CALL send_to_UART
                 LOAD UART_data, character_o
                 CALL send_to_UART
                 CALL send_space
                 LOAD UART_data, character_P
                 CALL send_to_UART
                 LOAD UART_data, character_W
                 CALL send_to_UART
                 LOAD UART_data, character_M
                 CALL send_to_UART
                 CALL send_space
                 LOAD UART_data, character_A
                 CALL send_to_UART
                 LOAD UART_data, character_c
                 CALL send_to_UART
                 LOAD UART_data, character_t
                 CALL send_to_UART
                 LOAD UART_data, character_i
                 CALL send_to_UART
                 LOAD UART_data, character_v
                 CALL send_to_UART
                 LOAD UART_data, character_e
                 CALL send_to_UART
                 CALL send_CR
                 CALL send_CR
                 RETURN
                 ;
                 ;
                 ;Send 'OK' to the UART
                 ;
        send_OK: CALL send_CR
                 LOAD UART_data, character_O
                 CALL send_to_UART
                 LOAD UART_data, character_K
                 CALL send_to_UART
                 JUMP send_CR
                 ;
                 ;
                 ;**************************************************************************************
                 ; Interrupt Service Routine (ISR)
                 ;**************************************************************************************
                 ;
                 ; Interrupts occur at 3.92us intervals and are used to generate the PWM pulses generated
                 ; at a PRF of 1KHz. The 3.92us interrupt rate corresponds with a resolution of 256 steps
                 ; over the 1ms associated with the 1KHz PRF.
                 ;
                 ; The ISR is self contained and all registers used are preserved. Scratch pad memory
                 ; locations are used to determine the desired duty factor for each of 12 channels.
                 ;
                 ; Note that an interrupt is generated every 196 clock cycles. This means that there is
                 ; only time to execute 98 instructions between each interrupt. This ISR is 48 instructions
                 ; long. A further 3 instructions are also consumed by the interrupt process
                 ; (abandoned instruction, virtual CALL to 3FF and the interrupt vector JUMP) and hence
                 ; PicoBlaze has approximately half of its time available for other tasks in the main program.
                 ;
                 ; Although a loop would normal be employed in software to process each of 12 channels,
                 ; the implementation of a loop would increase the number of instructions which needed to
                 ; be executed to such an extent that this 12 channel implementation would not be possible.
                 ; Consequently the code is written out in a linear fashion which consumes more program
                 ; space but which executes faster.
                 ;
            ISR: STORE s0, ISR_preserve_s0           ;preserve registers to be used
                 STORE s1, ISR_preserve_s1
                 STORE s2, ISR_preserve_s2
                 ;Determine the number of steps currently through the 1ms PWM cycle
                 FETCH s1, PWM_duty_counter          ;read 8-bit counter of steps
                 ADD s1, 01                          ;increment counter (will roll over to zero)
                 STORE s1, PWM_duty_counter          ;update count value in memory for next interrupt.
                 ;Read duty factor for each channel and compare it with the duty counter and set or
                 ;reset a bit in register s2 accordingly.
                 FETCH s0, PWM_channel11             ;read desired setting of pulse width
                 COMPARE s1, s0                      ;set carry flag if duty factor > duty counter
                 SLA s2                              ;shift carry into register s2
                 FETCH s0, PWM_channel10             ;read desired setting of pulse width
                 COMPARE s1, s0                      ;set carry flag if duty factor > duty counter
                 SLA s2                              ;shift carry into register s2
                 FETCH s0, PWM_channel9              ;read desired setting of pulse width
                 COMPARE s1, s0                      ;set carry flag if duty factor > duty counter
                 SLA s2                              ;shift carry into register s2
                 FETCH s0, PWM_channel8              ;read desired setting of pulse width
                 COMPARE s1, s0                      ;set carry flag if duty factor > duty counter
                 SLA s2                              ;shift carry into register s2
                 OUTPUT s2, simple_port              ;drive pins on connector J4
                 FETCH s0, PWM_channel7              ;read desired setting of pulse width
                 COMPARE s1, s0                      ;set carry flag if duty factor > duty counter
                 SLA s2                              ;shift carry into register s2
                 FETCH s0, PWM_channel6              ;read desired setting of pulse width
                 COMPARE s1, s0                      ;set carry flag if duty factor > duty counter
                 SLA s2                              ;shift carry into register s2
                 FETCH s0, PWM_channel5              ;read desired setting of pulse width
                 COMPARE s1, s0                      ;set carry flag if duty factor > duty counter
                 SLA s2                              ;shift carry into register s2
                 FETCH s0, PWM_channel4              ;read desired setting of pulse width
                 COMPARE s1, s0                      ;set carry flag if duty factor > duty counter
                 SLA s2                              ;shift carry into register s2
                 FETCH s0, PWM_channel3              ;read desired setting of pulse width
                 COMPARE s1, s0                      ;set carry flag if duty factor > duty counter
                 SLA s2                              ;shift carry into register s2
                 FETCH s0, PWM_channel2              ;read desired setting of pulse width
                 COMPARE s1, s0                      ;set carry flag if duty factor > duty counter
                 SLA s2                              ;shift carry into register s2
                 FETCH s0, PWM_channel1              ;read desired setting of pulse width
                 COMPARE s1, s0                      ;set carry flag if duty factor > duty counter
                 SLA s2                              ;shift carry into register s2
                 FETCH s0, PWM_channel0              ;read desired setting of pulse width
                 COMPARE s1, s0                      ;set carry flag if duty factor > duty counter
                 SLA s2                              ;shift carry into register s2
                 OUTPUT s2, LED_port                 ;drive LEDs
                 FETCH s0, ISR_preserve_s0           ;restore register values
                 FETCH s1, ISR_preserve_s1
                 FETCH s2, ISR_preserve_s2
                 RETURNI ENABLE
                 ;
                 ;
                 ;**************************************************************************************
                 ; Interrupt Vector
                 ;**************************************************************************************
                 ;
                 ADDRESS 3FF
                 JUMP ISR
                 ;
                 ;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品国产三级国产a | 天天综合网天天综合色| 九九精品视频在线看| 91精品国产综合久久小美女| 亚洲欧洲三级电影| 国产专区欧美精品| 正在播放亚洲一区| 亚洲男人的天堂av| 成人黄色综合网站| 2021久久国产精品不只是精品| 亚洲国产精品久久人人爱蜜臀| 成人成人成人在线视频| 精品人伦一区二区色婷婷| 亚洲高清中文字幕| 色国产综合视频| 中文字幕在线一区二区三区| 国产精品99久久久久久久女警| 日韩视频一区二区三区| 视频一区在线播放| 欧美丝袜自拍制服另类| 中文字幕日本不卡| 风间由美一区二区av101| 精品免费99久久| 麻豆一区二区99久久久久| 欧美高清精品3d| 亚洲一区二区影院| 色网综合在线观看| 亚洲图片欧美激情| 99re视频精品| 亚洲日本一区二区| 91麻豆自制传媒国产之光| 国产精品亲子乱子伦xxxx裸| 国产sm精品调教视频网站| 久久午夜电影网| 国产大陆亚洲精品国产| 国产无遮挡一区二区三区毛片日本| 久久97超碰国产精品超碰| 日韩欧美专区在线| 久久狠狠亚洲综合| 日韩欧美激情一区| 国内外成人在线| 久久影视一区二区| 国产成人精品免费| 国产精品私房写真福利视频| 成人午夜激情片| 亚洲日本电影在线| 91黄色小视频| 午夜精品久久久久久不卡8050| 欧美日韩在线播| 青青青爽久久午夜综合久久午夜| 91精品国产色综合久久久蜜香臀| 免费看欧美女人艹b| 日韩一区二区三区观看| 蜜臀av一区二区在线免费观看| 欧美xxxxx裸体时装秀| 国产呦萝稀缺另类资源| 久久久久高清精品| caoporm超碰国产精品| 一区二区三区免费在线观看| 在线看一区二区| 全国精品久久少妇| 久久精品在这里| 成人av资源网站| 亚洲午夜精品久久久久久久久| 91精品国产综合久久久久久| 久久av资源站| 中文字幕一区二区三区四区不卡| 色哟哟日韩精品| 激情另类小说区图片区视频区| 中文字幕精品三区| 在线欧美日韩精品| 九色porny丨国产精品| 国产精品区一区二区三区| 欧洲精品在线观看| 久久精品国产**网站演员| 中文字幕免费观看一区| 欧美亚洲动漫精品| 国产在线不卡视频| 亚洲精品欧美专区| 日韩精品综合一本久道在线视频| 国产不卡视频在线播放| 亚洲一区二区精品3399| 精品日韩av一区二区| 91丝袜美女网| 麻豆精品一二三| 国产精品电影一区二区| 欧美日韩不卡在线| 国产在线国偷精品产拍免费yy| 亚洲人123区| 精品国产乱码久久久久久闺蜜| 91啪亚洲精品| 精品一区二区久久| 一区二区三区四区精品在线视频 | 99热国产精品| 丝袜亚洲另类丝袜在线| 国产精品妹子av| 日韩一区二区三区视频在线| av一区二区三区四区| 男女男精品视频网| 国产精品日韩精品欧美在线| 欧美日本在线看| 99视频热这里只有精品免费| 精一区二区三区| 亚洲国产精品一区二区www| 中文字幕欧美日本乱码一线二线| 欧美人体做爰大胆视频| 成人黄色软件下载| 蜜臀av一区二区| 亚洲一区二区三区中文字幕在线| 国产性天天综合网| 91精品国产入口在线| 色婷婷精品久久二区二区蜜臀av | 亚洲综合色噜噜狠狠| 国产日韩欧美精品在线| 91麻豆精品国产91久久久久久 | 亚洲v日本v欧美v久久精品| 国产亚洲一区二区三区四区| 91精品在线麻豆| 91在线看国产| 国产1区2区3区精品美女| 午夜不卡av免费| 亚洲一区在线电影| 国产精品欧美久久久久一区二区 | 在线看日本不卡| 成人免费视频一区二区| 久久99精品国产麻豆不卡| 亚洲第一综合色| 亚洲一区二区在线视频| 一区在线观看视频| 国产精品卡一卡二卡三| 国产欧美中文在线| 欧美精品一区二区三区高清aⅴ| 3d成人动漫网站| 欧美网站一区二区| 日本韩国欧美在线| 91日韩在线专区| av午夜一区麻豆| 成人免费视频国产在线观看| 精品系列免费在线观看| 蜜桃视频在线一区| 日本成人中文字幕| 日本午夜精品一区二区三区电影| 亚洲午夜一区二区三区| 亚洲精品福利视频网站| 最好看的中文字幕久久| 中文字幕一区二区三中文字幕| 国产欧美久久久精品影院| 久久久久久久一区| 久久一夜天堂av一区二区三区| 亚洲精品一区二区三区影院| 精品国产乱码久久久久久图片| 欧美成人精品福利| www国产成人| 久久影音资源网| 日本一区二区三区视频视频| 亚洲国产精品av| 国产精品热久久久久夜色精品三区| 国产欧美一区二区精品性| 亚洲国产成人一区二区三区| 国产精品九色蝌蚪自拍| 17c精品麻豆一区二区免费| 亚洲少妇最新在线视频| 亚洲一区二区三区四区在线观看| 亚洲一区在线看| 日韩高清不卡一区二区| 美国毛片一区二区| 国产自产v一区二区三区c| 国产高清精品网站| 成人激情文学综合网| 一本大道久久a久久精品综合| 欧美专区在线观看一区| 欧美一区二区在线观看| 精品成人免费观看| 国产精品嫩草影院av蜜臀| 专区另类欧美日韩| 亚洲aⅴ怡春院| 看片网站欧美日韩| 国产99久久久国产精品免费看 | 成人福利视频在线| 99久久精品免费看国产免费软件| 色婷婷综合久久久久中文一区二区| 欧美丝袜丝交足nylons图片| 5858s免费视频成人| 精品久久人人做人人爰| 欧美国产精品久久| 亚洲美女少妇撒尿| 日本aⅴ免费视频一区二区三区| 国产综合一区二区| av在线不卡电影| 91精品黄色片免费大全| 久久久久久久久久美女| 亚洲欧美视频一区| 蜜桃av一区二区| 成人黄色av网站在线| 欧美日韩视频专区在线播放| 欧美成人激情免费网| 日本一区二区成人| 亚洲国产欧美一区二区三区丁香婷| 裸体在线国模精品偷拍| 成人白浆超碰人人人人|