Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

Legacy microcontrollers Forum Discussions

jabic_2034161
Level 1
First reply posted First question asked First like given
Level 1

Hello

I have CY51F526 mcu. There is an crystal 4.0MHz connected.

I would like to use PLL to drive mcu with 40MHz.

How can I do it using C not assembler?

Do you have any code examples?

Best regards

Jakub

0 Likes
2 Replies
HongyanW_86
Moderator
Moderator 100 solutions authored 100 replies posted 50 solutions authored
Moderator

Hello,

Here is the link of CY91520 sample code but the PLL is configured in startup.asm in assembler:

//Select tab "Sample Program"

https://www.cypress.com/products/cy91520

If you need to configure PLL in C code, please kindly refer to the start.asm and chapter 5 of CY91520.

https://www.cypress.com/file/251301/download

Best regards,

Amy Wang

jabic_2034161
Level 1
First reply posted First question asked First like given
Level 1

Hello Amy

Thank you for your reply. You are right. I done something similiar.

What I did:

void PLL_INIT()

{

     #pragma asm

     Here I copy pased pll init rountine from asm file

     #pragma endasm

}

And it works perfect:)

0 Likes