• slider image 442
  • slider image 483
  • slider image 484
  • slider image 485
  • slider image 486
  • slider image 487
:::

論壇索引


Board index » All Posts (W.W.)




Re: (PIC16F1769) PRG的LR bit 無法設定
#1
初級會員
初級會員


版主您好,

抱歉,我試很久都不知道怎麼附加圖片,用ZIP檔。

圖一是開啟您給的檔案,裡面是 沒將LR打開。
圖二是我的MCC設定。
圖三與圖四是示波器顯示結果,但長得一模一樣。

謝謝。

Attach file:


Link only for registered users

發表於: 2021/8/20 10:47
頂部


(PIC16F1769) PRG的LR bit 無法設定
#2
初級會員
初級會員


各位先進前輩您好,

Datasheet顯示在PIC16F1769與PIC16F1768 時可使用(PRG1CON2)LR bit 調整Ramp的斜率,

但是 經過測試,LR bit 無法設定進去,斜率與 該Bit是0的時候一樣,
且 利用變數讀出設定值時,LR一樣是0。
想請問是否遺漏了甚麼嗎?
Cpde 如下:

void PRG1_Initialize(void)
{
// RG1GO not operating; RG1EN enabled; RG1MODE rising ramp generator; RG1OS disabled; RG1REDG level_sensitive; RG1FEDG level_sensitive;
PRG1CON0 = 0x88;
// RG1FPOL active_low; RG1RPOL active_high;
PRG1CON1 = 0x02;
// INS DAC3_output;
PRG1INS = 0x05;
// RG1ISET 0.04 V/us; LR enabled;
PRG1CON2 = 0x80;
// RTSS PWM3_output;
PRG1RTSS = 0x05;
// FTSS PWM3_output;
PRG1FTSS = 0x05;

}

void main(void)
{
// initialize the device
SYSTEM_Initialize();

// When using interrupts, you need to set the Global and Peripheral Interrupt Enable bits
// Use the following macros to:


// Enable the Global Interrupts
INTERRUPT_GlobalInterruptEnable();

// Enable the Peripheral Interrupts
INTERRUPT_PeripheralInterruptEnable();

// Disable the Global Interrupts
//INTERRUPT_GlobalInterruptDisable();

//Disable the Peripheral Interrupts
//INTERRUPT_PeripheralInterruptDisable();

PRG1_StartRampGeneration();
while (1)
{
// Add your application code
a = PRG1CON2;
}
}

謝謝。

發表於: 2021/8/18 20:13
頂部


空中教室課程講義與影片
#3
初級會員
初級會員


請問,

沒有報名空中教室課程(錯過時間且時間不允許),
有辦法下載講義並自行在家利用額外的時間觀看影片?

謝謝。

發表於: 2021/1/7 9:13
頂部


Re: Curiosity PIC16F1769 DAC 輸出問題
初級會員
初級會員



發表於: 2019/12/30 11:30
頂部



(1) 2 3 »



:::

Microchip連結

https://www.facebook.com/microchiptechnologytaiwan/
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=13
https://mu.microchip.com/page/tmu
http://elearning.microchip.com.tw/modules/tad_link/index.php?cate_sn=1
https://page.microchip.com/APAC-PrefCenters-TW.html
http://www.microchip.com/
http://www.microchip.com/treelink
http://www.microchipdirect.com/
http://www.microchip.com.cn/newcommunity/index.php?m=Video&a=index&id=103
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=2
http://www.microchip.com.tw/Data_CD/eLearning/index.html
http://www.microchip.com.tw/RTC/RTC_DVD/
https://www.microchip.com/development-tools/
https://www.youtube.com/user/MicrochipTechnology
[ more... ]

教育訓練中心

!開發工具購買
辦法說明 [業界客戶] [教育單位]
----------------------------------
!校園樣品申請
辦法說明 [教師資格] [學生資格]
----------------------------------