اطلاعیه

Collapse
No announcement yet.

main oscillator عدم فعال سازی و پروگرم نشدن آن

Collapse
X
 
  • فیلتر
  • زمان
  • Show
Clear All
new posts

    main oscillator عدم فعال سازی و پروگرم نشدن آن

    با سلام خدمت همگی
    من سهوا تیک main oscillator در Keil را نزدم و بعد از یک پروگرم میکرو من دیگه به هیج عنوان پروگرم نمیشه
    مشکل حل شدنی هست و به چه طریقی
    پیشاپیش ممنون

    #2
    پاسخ : main oscillator عدم فعال سازی و پروگرم نشدن آن

    با سلام
    http://www.keil.com/forum/9427/
    http://www.keil.com/support/man/docs...verify_com.htm
    http://www.eca.ir/forum2/index.php?t...6975#msg236975


    void PLL_Init(void)
    {
    SCS = (0x00000001 << 5); //Enable Main Oscillator
    SCS |= 0x00000020; //Select the main Oscillator range
    PLLCON &= ~0x01; //Disconnect the PLL

    PLLFEED = 0xAA;
    PLLFEED = 0x55;
    PLLCON &= ~0x01; //Disable the PLL
    PLLFEED = 0xAA;
    PLLFEED = 0x55; //Write feed sequence
    while(!(SCS & 0x00000040)); //Wait untill Main Oscillator is stable

    CLKSRCSEL = 0x00000001; //Select Main Oscillator as PLL Imput
    PLLCFG = (0x0000063|0x00030000); //Write PLL Multipiler and Divider values
    PLLFEED = 0xAA;
    PLLFEED = 0x55; //Write Feed Sequence
    PLLCON = 0x01; //Enable PLL
    PLLFEED = 0xAA;
    PLLFEED = 0x55; //Wriete Feed Sequence
    USBCLKCFG = 0x00000009; //Write USBSEL Divider value
    CCLKCFG = 0x00000008; //Write CPU Divider Value
    while(PLLSTAT & 0x000); //Wait PLL for Lock
    PLLCON |= 0x02; //Connect the PLL
    PLLFEED = 0xAA;
    PLLFEED = 0x55; //Write Feed Sequence

    }

    اگر تنظیمات اولیه را بر روی اسیلاتور داخلی تنظیم کنید و یک تاخیر کوچیک بذارید بعد تابع زیر را فرا بخوانید و مقدارها را دستی داخل این تنظیم کنید هر نوع اور کلاک سی پی یو گرفته میشه و براحتی جی تگ اونو میشناسه

    دیدگاه

    لطفا صبر کنید...
    X