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

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

?? auto_pwm.psm

?? 和picoblaze完全兼容的mcu ip core
?? 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一区二区三区免费野_久草精品视频
色婷婷综合久色| 91在线云播放| 中文字幕佐山爱一区二区免费| 91激情五月电影| 韩国v欧美v亚洲v日本v| 一区二区三区蜜桃| 26uuu亚洲| 欧美美女一区二区| 99久久99久久久精品齐齐| 日本v片在线高清不卡在线观看| 亚洲欧洲精品成人久久奇米网| 日韩欧美电影一二三| 欧洲精品一区二区| 不卡的电影网站| 国内精品免费**视频| 亚洲成av人片一区二区梦乃| 中文字幕日韩欧美一区二区三区| 精品美女在线播放| 欧美一区二区三区小说| 欧美在线短视频| 97se亚洲国产综合自在线不卡| 国产真实精品久久二三区| 青娱乐精品在线视频| 亚洲一区二区免费视频| 亚洲男女一区二区三区| 国产精品萝li| 国产免费观看久久| 久久婷婷国产综合精品青草| 日韩欧美中文字幕精品| 欧美一区二区三区啪啪| 欧美色电影在线| 欧美午夜精品久久久久久孕妇 | 欧美一二三区在线观看| 在线观看日韩精品| 色播五月激情综合网| 99re热视频精品| 97久久精品人人澡人人爽| 成人动漫av在线| av福利精品导航| 99re8在线精品视频免费播放| 成人一区在线看| 不卡一区在线观看| 99精品欧美一区二区三区小说 | 亚洲精品国产精品乱码不99| 国产精品国产三级国产| 中文字幕一区日韩精品欧美| 国产精品国模大尺度视频| 国产精品美女久久久久久久| 国产精品不卡一区二区三区| 亚洲欧洲日产国码二区| 亚洲欧美日韩国产中文在线| 亚洲欧美在线aaa| 亚洲伊人色欲综合网| 亚洲sss视频在线视频| 男女性色大片免费观看一区二区| 美女一区二区三区在线观看| 精品一区二区免费| 国产成人亚洲综合a∨婷婷| av亚洲精华国产精华| 一本大道综合伊人精品热热| 欧美色精品在线视频| 日韩欧美123| 欧美国产亚洲另类动漫| 亚洲欧美韩国综合色| 亚洲第一狼人社区| 久久精品国产精品亚洲红杏 | 一本大道久久a久久精二百| 在线观看三级视频欧美| 日韩一级完整毛片| 亚洲国产精品二十页| 亚洲黄色免费网站| 日本成人中文字幕在线视频| 国产99久久久国产精品潘金| 91视频精品在这里| 日韩一级二级三级精品视频| 国产欧美日产一区| 亚洲一区二区高清| 国产精品资源在线观看| 色婷婷国产精品| 欧美成人bangbros| 亚洲精品日产精品乱码不卡| 日韩精品久久久久久| 国产成人在线网站| 欧美日韩亚洲国产综合| 久久美女艺术照精彩视频福利播放| 国产精品视频观看| 热久久一区二区| 99久久久免费精品国产一区二区| 91精品国产色综合久久久蜜香臀| 国产无遮挡一区二区三区毛片日本| 一区二区在线观看免费视频播放| 久久99精品久久久| 91福利国产精品| 国产亚洲短视频| 日产精品久久久久久久性色| 成人av片在线观看| 日韩片之四级片| 亚洲狠狠爱一区二区三区| 国产另类ts人妖一区二区| 欧美视频一二三区| 亚洲三级电影网站| 国产乱码精品一区二区三区五月婷| 欧美午夜精品免费| 成人欧美一区二区三区黑人麻豆| 久久精品99久久久| 欧美日韩免费一区二区三区| 国产精品久久看| 国产精品一区二区三区乱码| 51精品久久久久久久蜜臀| 国产精品久久久久7777按摩| 国产中文字幕精品| 91精品一区二区三区久久久久久| 1024精品合集| 菠萝蜜视频在线观看一区| 精品福利在线导航| 日韩av电影免费观看高清完整版在线观看| 97久久精品人人做人人爽 | 青青草国产精品97视觉盛宴| 91网站在线播放| 国产精品免费看片| 国产高清在线精品| 精品国产一区久久| 免费美女久久99| 欧美一级理论片| 视频一区视频二区在线观看| 色综合天天综合网天天狠天天| 欧美国产精品一区二区三区| 国产一区二区电影| 国产校园另类小说区| 国产综合色产在线精品| 精品免费99久久| 国产美女在线观看一区| 欧美大片顶级少妇| 韩国精品主播一区二区在线观看| 一区二区视频在线看| 99国产精品久| 亚洲色图另类专区| 色哟哟亚洲精品| 一区二区三区 在线观看视频| 91原创在线视频| 亚洲色图制服诱惑| 色综合视频在线观看| 亚洲日本在线天堂| 在线观看网站黄不卡| 亚洲国产美女搞黄色| 欧美日韩dvd在线观看| 三级欧美韩日大片在线看| 日韩一区二区三区精品视频| 久久爱另类一区二区小说| 精品国产乱子伦一区| 国产乱人伦偷精品视频不卡| 国产精品久久久久久久午夜片| a级高清视频欧美日韩| 亚洲人成影院在线观看| 欧美日韩卡一卡二| 蜜桃av一区二区三区| 久久精子c满五个校花| 成人高清免费在线播放| 亚洲欧美日韩中文播放| 8x福利精品第一导航| 国产综合成人久久大片91| 国产精品丝袜在线| 在线免费观看日韩欧美| 爽爽淫人综合网网站| 精品三级av在线| 国产成人精品免费在线| 亚洲色图一区二区| 3d成人动漫网站| 国产91精品一区二区麻豆亚洲| 亚洲日本韩国一区| 91精品国产综合久久福利软件| 激情综合色播激情啊| **网站欧美大片在线观看| 欧美精品高清视频| 国产不卡高清在线观看视频| 亚洲女性喷水在线观看一区| 91精品国产综合久久久蜜臀粉嫩 | 亚洲视频一区二区在线| 欧美一区二区三区性视频| 成人免费三级在线| 婷婷六月综合亚洲| 中文一区在线播放| 制服视频三区第一页精品| 成人免费观看视频| 婷婷综合在线观看| 日韩美女视频一区二区| 欧美成人vr18sexvr| 在线观看三级视频欧美| 国产成人午夜视频| 亚洲成人av福利| 中文字幕一区二区三| 日韩欧美高清一区| 色老汉一区二区三区| 国产剧情一区在线| 视频一区中文字幕国产| 亚洲欧美日韩中文字幕一区二区三区 | 91福利在线看| 国产精品99久久久久| 奇米影视在线99精品| 亚洲欧美日韩国产成人精品影院|