,0x6d,0x7d,0x07};char cbit[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};char buffer[]={0x40
2013-07-15 22:52
1mSDelayUs2x(245); DelayUs2x(245); }}//DS18B20.cbit Init_DS18B20(void){ bit dat=1; DQ = 0; //DQ复位
2017-10-30 20:56
您好,我使用PIC16F690和我有3个问题关于PWM.1.在公式中,PWM周期=4×ToSx x(PR2 + 1)x(TMR2 PrasCe值),为什么它是PR2 + 1而不是PR2?我知道它是从数据表中获得的,但是必须有一个原因。2。寄存器CCPR1L用于PWM的较低8位。然而,PWM的分辨率是10位,但只有CCPR1L寄存器需要设置占空比。为什么其他2位不需要?三。由于CCPR1L设置占空比,为什么图11.3表示仅使用2位CCPR1L,而应该使用8位CCPR1H,而占空比的公式是:占空比=CCPR1L:CCP1CON<5:4和g/t;4(PR2+ 1),这意味着CCP1CON位5和4应该用于设置任务。循环,但图11.3表示使用CCPR1H和其他来源说只有CCPR1L应该被使用。什么是正确的方法? 以上来自于百度翻译 以下为原文 Hello, I am using the PIC16F690 and I have 3 questions regarding PWM.1.In the formula, PWM period = 4 x Tosc x ( PR2 + 1) x (TMR2 prescale value), why is it PR2 + 1 instead of just PR2? I know it’s obtained from the datasheet but there has to be a reason why.2. The register CCPR1L is for the lower 8 bits of PWM. However, the resolution for PWM is 10 bits yet only CCPR1L register needs to be set for the duty cycle. Why are the other 2 bits not needed?3. Since CCPR1L sets the duty cycle, why does figure 11.3 say that only 2 bits of the CCPR1L are used and 8 bits of CCPR1H should be used while the formula for duty cycle is:Duty cycle ratio = CCPR1L:CCP1CON/4(PR2+1)This implies that CCP1CON bits 5 and 4 should be used for setting the duty cycle, but figure 11.3 says to use CCPR1H and other sources say that only CCPR1L should be used. What’s the right way?
2018-11-01 09:47
本文通过几个典型的R&S甚高频通信系统故障维修案例来对每一类故障从不同的角度进行阐述。
2021-05-14 06:18