日韩成人激情_欧美黑人xxx_国产一区二精品区在线_精品在线一区_97成人资源_久久久久久一区

產品分類

當前位置: 首頁 > 傳感測量產品 > 數據采集產品 > 數據通訊產品 > 現場總線/網關

類型分類:
科普知識
數據分類:
現場總線/網關

直接測量微處理器總線時鐘的程序

發布日期:2022-04-18 點擊率:88

  用單控制環檢驗HC08 SCS08微處理器的總線頻率。

  Freescale公司的HC08和更新的HCS08微處理器系列具有通用外圍模塊。時鐘發生器也不例外。其范圍從任意I/O引腳的內部時鐘到外部晶體或晶振。一旦選擇了時鐘源,可以有多種控制最終總線頻率的選擇。例如,為MC9S08GB微處理器連接一個32,768Hz的晶體,允許使用FLL(鎖頻環)產生最多18.874 MHz的總線頻率。選擇源、除數和FLL允許多功能且復雜的設置。

  一旦寫入總線時鐘初始化程序,在繼續工程其它部分之前,也許想檢驗總線是否以期望的速度運行。本設計方案給出在任意I/O端口以總線1/9的精確速度輸出方波的程序(清單1和清單2)。僅連接一個頻率計數器到這個管腳,顯示總線頻率。只需做的是將小數點向右移動一位。一旦檢驗總線速度,可以信賴的寫定時器、串行I/O和其他時鐘有關的程序。

  只需要寫代碼,首先關中斷和關COP(共有片上處理器)。在總線時鐘初始化程序中,確保將想要使用的I/O端口初始化為輸出。然后,只跳到toggle clock,輸出總線頻率除10,直到斷電。本設計方案使用HC08版的PB0(

清單1)和HCS08版的PD0(清單2)。通過改變第一條線確定端口和第二條線選擇位,可以使用任何適合的I/O端口。本設計方案也命名了老符號PB的端口,替代如今常用的PTB。

  英文原文:

  Routines directly measure microcontroller-bus clock

  You can verify the bus frequency of the HC08 SCS08 microcontroller with simple control loops.

  Kerry Erendson, Bulova Technologies; Edited by Charles H Small and Fran Granville -- EDN, 10/25/2007

  The Freescale HC08 and newer HCS08 microcontroller families have versatile peripheral modules. Their clock generators are no exceptions. They range from the internal clock, which frees I/O pins, to external crystals or oscillators. once you selec the timing source, you have many options for controlling the final bus frequency. For instance, connecting a 32,768-Hz crystal to an MC9S08GB microcontroller allows you to use the FLL (frequency-locked loop) to generate many bus frequencies as high as 18.874 MHz. Selecting the source, the divisors, and the FLL settings allows versatility but also can get complicated.

  once you write the bus-clock-initialization routine, you may want to verify that the bus is running at the speed you intend before moving on to the rest of the project. This Design Idea presents routines that output a square wave at exactly one-tenth the bus speed on any I/O port (Listing 1 and Listing 2). Just connect a frequency counter to this pin, and it will display your bus frequency. All you have to do is move the decimal point one place to the right. once you verify the bus speed, you can confidently write the timer, serial-I/O, and other clock-dependent routines.

  You need to write code only to first disable interrupts and disable the COP (common on-chip processor). In your bus-clock-initialization routine, be sure to initialize the I/O port you want to use as an output. Then, just jump to the toggle clock, which outputs the bus frequency divided by 10 until power-down. This Design Idea uses PB0 in the HC08 version (Listing 1) and PD0 in the HCS08 version (Listing 2). You can use any available I/O

port by altering the first line to identify the port and the second line to choose a bit. Also, this Design Idea names ports with the older notation PB, instead of today’s more fashionable PTB.

 

下一篇: PLC、DCS、FCS三大控

上一篇: 索爾維全系列Solef?PV

推薦產品

更多
主站蜘蛛池模板: 亚洲精品久久久久久国产精华液 | 亚州综合在线 | 日韩a v在线免费观看 | 成人免费大片黄在线播放 | 国产区一区二区三区 | 久久久精品一区二区三区 | 国产一区二区三区高清 | 一级免费在线视频 | 一区二区三区在线播放 | www成人免费 | 美女爽到呻吟久久久久 | 亚洲精品乱码久久久久久按摩观 | 亚洲一区精品在线 | 天天色天天射天天干 | 99久久婷婷国产综合精品电影 | 一区二区三区免费在线观看 | 亚洲一二三区免费 | 青青久久久 | 久久er99热精品一区二区 | 一区二区三区回区在观看免费视频 | 色婷婷久久久亚洲一区二区三区 | 欧美日韩1区2区 | 精品一区二区三区四区 | 日本成人中文字幕 | www.亚洲精品 | 午夜精品久久久久久久星辰影院 | 日本精品一区二区三区视频 | 岛国在线免费观看 | 最新午夜综合福利视频 | 中文字幕一区二区三区在线观看 | 欧美 日韩 中文 | a视频在线观看 | 羞羞的视频免费观看 | 全免一级毛片 | 蜜桃在线一区二区三区 | 日本二区在线观看 | 日韩高清国产一区在线 | 日韩在线一区二区三区 | 久久久久久久久久久久久久久久久久久久 | 免费人成在线观看网站 | 超碰人人在线 |