本文整理汇总了C++中PLL_Init函数的典型用法代码示例。如果您正苦于以下问题:C++ PLL_Init函数的具体用法?C++ PLL_Init怎么用?C++ PLL_Init使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PLL_Init函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: main
int main()
{
// unsigned char onechar = 'a';
PLL_Init();
PortA_Init();
PortC_Init();
SysTick_Init();
Nokia5110_Init();
// Зеленый светодиод выкл, PC9. Синий сетодиод вкл, PC8. Положительная логика
GPIOC_BSRR = 0x2000100;
Nokia5110_Clear();
while(1){
if((GPIOA_IDR & 0x1)){ // Проверяем нажатие кнопки, PA0. Положительная логика
GPIOC_BSRR = 0x1000200; // Синий LED off. Зеленый LED on
SysTick_Wait10ms(20); // задержка 200 мс
GPIOC_BSRR = 0x3000000; // Синий LED off. Зеленый LED off
SysTick_Wait10ms(20); // задержка 200 мс
Nokia5110_OutString("Hello,World!");
}
else
GPIOC_BSRR = 0x2000100; // Синий светодиод вкл. Зеленый сетодиод выкл
}
}
开发者ID:sl-ur,项目名称:Start-STM,代码行数:26,代码来源:main.c
示例2: main
int main(void) { PLL_Init();
SysFun(); // 80 MHz
PortA_Init() ; // initialize output and interrupts
EnableInterrupts();
/*Initialize ports and timers*/
while(1){
unsigned long i,j;
for(i=80000; i<=160000; i+=16000) /*on time starts from 1msec to 2msec with a increment of 0.2msec risein on tim */
{
for(j=0;j<4;j++)
{
GPIO_PORTA_DATA_R |= (0x40);
SysLoad(i);
GPIO_PORTA_DATA_R &= ~(0x40);
SysLoad(1600000-i);
}
}
for(i=160000; i>=80000; i-=16000)
{
for(j=0;j<4;j++)
{
GPIO_PORTA_DATA_R |= (0x40);
SysLoad(i);
GPIO_PORTA_DATA_R &= ~(0x40);
SysLoad(1600000-i);
}
}
}
}
开发者ID:nagarjun301,项目名称:eds15m003,代码行数:30,代码来源:pwm.c
示例3: main
// 3. Subroutines Section
// MAIN: Mandatory for a C Program to be executable
int main(void){
PLL_Init(); // 80 MHz
Port_Init();
ADC0_InitSWTriggerSeq3_Ch1();
EnableInterrupts();
SysFun();
/*Initialize ports , ADC and timers*/
while(1){
/*Your code goes here*/
a= ADC0_InSeq3();
t1=a+(10000/4096)+10000;
in1=50;
while(in1)
{
GPIO_PORTA_DATA_R |= (0x20);
SysLoad(t1);
GPIO_PORTA_DATA_R &= ~(0x20);
SysLoad(t-t1);
in1=in1-1;
}
}
}
开发者ID:sarang5258,项目名称:cds7-lab,代码行数:29,代码来源:dcmotor1.c
示例4: main
//------------main----------------------------
int main(void){
PLL_Init();
SysTick_Init();
Switch_Init();
Output_Init();
// print intro screen to lab
printf(" Fixed-point Lab\n");
printf("\n\n\n\n\n\n\n\n\n\n");
printf(" By:\n");
printf(" Brandon Boesch\n");
printf(" Curtis Martin\n");
printf(" Press SW2 to begin\n");
ST7735_DrawBitmap(30, 108, bmp_Logo, 70, 100);
// begin tests
while(PF0 == 0x01){};
Fixed_uDecOut2_test();
while(PF0 == 0x01){};
Fixed_sDecOut3_test();
while(PF0 == 0x01){};
Fixed_uBinOut8_test();
while(PF0 == 0x01){};
// outro screen
Output_Clear();
ST7735_SetCursor(0,0);
printf("Tests complete!");
ST7735_DrawBitmap(6, 159, bmp_thumbs, 114, 146);
while(1){};
}
开发者ID:herettic,项目名称:445L,代码行数:32,代码来源:Lab1.c
示例5: main
int main(void)
{
unsigned long input= 0;
PLL_Init();
Sound_Init(); // initialize SysTick timer and DAC
Piano_Init();
EnableInterrupts(); // enable after all initialization are done
while(1)
{
// input from keys to select tone
input= Piano_In();
switch (input)
{
case 0x01:
Sound_Tone(C);
break;
case 0x10:
Sound_Tone(D);
break;
case 0x04:
Sound_Tone(E);
break;
case 0x08:
Sound_Tone(G);
break;
default:
Sound_Off();
break;
}
}
}
开发者ID:Hzza3,项目名称:TM4C12x,代码行数:34,代码来源:main.c
示例6: main
int main(){
int i = 0;
PLL_Init();
SysCtlClockSet(SYSCTL_SYSDIV_4 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN |
SYSCTL_XTAL_8MHZ); // 50 MHz
DisableInterrupts();
SYSCTL_RCGC1_R |= SYSCTL_RCGC1_TIMER0;// activate timer0
SYSCTL_RCGC2_R |= SYSCTL_RCGC2_GPIOF+SYSCTL_RCGC2_GPIOG; // activate ports F and G
Output_Init();
SysTick_InitSeconds(1);
PolledButtons_Init();
EnableInterrupts();
displayMode = 0;
ringAlarms = 0;
timeMode = 0;
while(1){
if (ringAlarms && !soundPlaying && (alarmActive || timeMode == 4)) {
playSound();
}
else if ((ringAlarms==0 || !alarmActive) && soundPlaying) {
stopSound();
}
if(displayMode==0) {
displayClock();
}
else if(displayMode==1){
displaySet();
}
}
}
开发者ID:glockwork,项目名称:EE445L,代码行数:31,代码来源:clockmain.c
示例7: main1
int main1(void){
PLL_Init();
ST7735_InitR(INITR_REDTAB);
while(1){
plotImage();
}
}
开发者ID:manavm,项目名称:Classes,代码行数:7,代码来源:Lab5.c
示例8: main
int main(void){uint32_t i;
PLL_Init(Bus80MHz);
PortF_Init();
ST7735_InitR(INITR_REDTAB);
while(1){
ST7735_FillScreen(0); // set screen to black
ST7735_SetCursor(0,0);
printf("Lab 1\rST7735_sDecOut3\r");
for(i=0; i<13; i++){
ST7735_sDecOut3(outTests1[i].InNumber); // your solution
ST7735_OutString((char*)outTests1[i].OutBuffer); // expected solution
}
//Pause();
ST7735_FillScreen(0); // set screen to black
ST7735_SetCursor(0,0);
printf("ST7735_uBinOut8\r");
for(i=0; i<14; i++){
ST7735_uBinOut8(outTests2[i].InNumber); // your solution
ST7735_OutString((char*)outTests2[i].OutBuffer); // expected solution
}
//Pause();
ST7735_XYplotInit("Circle",-2500, 2500, -2500, 2500);
ST7735_XYplot(180,(int32_t *)CircleXbuf,(int32_t *)CircleYbuf);
//Pause();
ST7735_XYplotInit("Star- upper right",-450, 150, -400, 200);
ST7735_XYplot(50,(int32_t *)StarXbuf,(int32_t *)StarYbuf);
Pause();
}
}
开发者ID:KylePolansky,项目名称:EE445L,代码行数:32,代码来源:Lab1.c
示例9: main
int main(void){
DisableInterrupts();
PLL_Init(Bus80MHz); // bus clock at 80 MHz
UART_Init();
ST7735_InitR(INITR_REDTAB);
ADC0_InitTimerTriggerSeq3_Ch0();
EnableInterrupts();
/*
UART_OutString("Points: \r\n");
while(currentIndex < 100);
for(int i = 0; i < 100; i += 1) {
UART_OutUDec(data[i]);
UART_OutString("\r\n");
}
*/
while(1) {
ST7735_SetCursor(0, 0);
int32_t currentTemperature = Temperature_Convert(ADC_FIFO_CurrentValue());
printf("Temperature %5d.%02d\n", currentTemperature / 100, currentTemperature % 100);
ST7735_PlotClear(32, 159);
//TODO change color?
for(int i = 0; i < FIFO_SIZE; i += 1) {
int32_t point = 128 - Temperature_Convert(ADC_FIFO_Get()[i]) * 2 / 100;
ST7735_DrawPixel(i+1, point+1, ST7735_RED);
ST7735_DrawPixel(i+1, point, ST7735_RED);
ST7735_DrawPixel(i, point+1, ST7735_RED);
ST7735_DrawPixel(i, point, ST7735_RED);
}
WaitForInterrupt();
}
}
开发者ID:JohnStarich,项目名称:ee445l,代码行数:34,代码来源:Main.c
示例10: main
int main(void){
uint32_t count = 0;
PLL_Init(); // set system clock to 50 MHz
Nokia5110_Init();
Nokia5110_Clear();
for(count=0; count<1; count=count+1){
Nokia5110_DrawFullImage(Longhorn);
Delay(16666667); // delay ~1 sec at 50 MHz
Nokia5110_DrawFullImage(Longhorn2);
Delay(16666667); // delay ~1 sec at 50 MHz
}
// count = 0;
Nokia5110_Clear();
// Nokia5110_OutString("************* LCD Test *************Letter: Num:------- ---- ");
//Nokia5110_OutChar(127); // print UT sign
while(1){
Nokia5110_SetCursor(0,0);
Nokia5110_OutString("Hello World");
Nokia5110_OutString(" bright future");
Delay(8333333); // delay ~0.5 sec at 50 MHz
//count = count + 1;
}
}
开发者ID:rajarajeswarie,项目名称:eds15m008,代码行数:26,代码来源:Nokia5110TestMain.c
示例11: main
//debug code
int main(void){
PLL_Init(Bus80MHz); // bus clock at 50 MHz
Output_Init();
SYSCTL_RCGCGPIO_R |= 0x20; // activate port F
//ADC0_InitTimer0ATriggerSeq3(2, F30HZ); // ADC channel 0, 1000 Hz sampling
ADC0_InitTimer0ATriggerSeq3PD3(F30HZ);
//ADC0_InitSWTriggerSeq3_Ch9();
while((SYSCTL_PRGPIO_R&0x0020) == 0){};// ready?
GPIO_PORTF_DIR_R |= 0x02; // make PF1 output (PF1 built-in LEDs)
GPIO_PORTF_AFSEL_R &= ~0x02; // disable alt funct on PF1
GPIO_PORTF_DEN_R |= 0x02; // enable digital I/O on PF1
// configure PF1 as GPIO
GPIO_PORTF_PCTL_R = (GPIO_PORTF_PCTL_R&0xFFFFF0FF)+0x00000000;
GPIO_PORTF_AMSEL_R = 0; // disable analog functionality on PF
EnableInterrupts();
plotInit();
while(1){
GPIO_PORTF_DATA_R ^= 0x02; // toggle LED
//ADCvalue = ADC0_InSeq3();
temperature = adcToTemp(ADCvalue + offset);
plotPoint();
ST7735_SetCursor(1,2);
ST7735_sDecOut2(temperature);
ST7735_SetCursor(2,1);
ST7735_OutUDec(ADCvalue + offset);
}
}
开发者ID:jsnowboard,项目名称:EE-445L,代码行数:30,代码来源:PeriodicTimer0AInts.c
示例12: main
//debug code
int main(void){
char ch;
char string[20]; // global to assist in debugging
uint32_t n;
PLL_Init(Bus50MHz); // 50 MHz
UART_Init(); // initialize UART
OutCRLF();
for(ch='A'; ch<='Z'; ch=ch+1){// print the uppercase alphabet
UART_OutChar(ch);
}
OutCRLF();
UART_OutChar(' ');
for(ch='a'; ch<='z'; ch=ch+1){// print the lowercase alphabet
UART_OutChar(ch);
}
OutCRLF();
UART_OutChar('-');
UART_OutChar('-');
UART_OutChar('>');
while(1){
UART_OutString("InString: ");
UART_InString(string,19);
UART_OutString(" OutString="); UART_OutString(string); OutCRLF();
UART_OutString("InUDec: "); n=UART_InUDec();
UART_OutString(" OutUDec="); UART_OutUDec(n); OutCRLF();
UART_OutString("InUHex: "); n=UART_InUHex();
UART_OutString(" OutUHex="); UART_OutUHex(n); OutCRLF();
}
}
开发者ID:kapil-utexas,项目名称:RTOS-from-bottom-up,代码行数:35,代码来源:UARTTestMain.c
示例13: OS_Init
// ******** OS_Init ************
// initialize operating system, disable interrupts until OS_Launch
// initialize OS controlled I/O: systick, 50 MHz PLL
// input: none
// output: none
void OS_Init(void){
OS_DisableInterrupts();
PLL_Init(); // set processor clock to 50 MHz
NVIC_ST_CTRL_R = 0; // disable SysTick during setup
NVIC_ST_CURRENT_R = 0; // any write to current clears it
NVIC_SYS_PRI3_R =(NVIC_SYS_PRI3_R&0x00FFFFFF)|0xE0000000; // priority 7
}
开发者ID:ismaellc,项目名称:SOTR,代码行数:12,代码来源:os.c
示例14: main
int main(void){
Output_Init();
// ST7735_XYplotInit("Temp", 0, 100, 0, 100);
PLL_Init(Bus80MHz); // 80 MHz
SYSCTL_RCGCGPIO_R |= 0x20; // activate port F
ADC0_InitSWTriggerSeq3_Ch9(); // allow time to finish activating
Timer0A_Init100HzInt(); // set up Timer0A for 100 Hz interrupts
GPIO_PORTF_DIR_R |= 0x06; // make PF2, PF1 out (built-in LED)
GPIO_PORTF_AFSEL_R &= ~0x06; // disable alt funct on PF2, PF1
GPIO_PORTF_DEN_R |= 0x06; // enable digital I/O on PF2, PF1
// configure PF2 as GPIO
GPIO_PORTF_PCTL_R = (GPIO_PORTF_PCTL_R&0xFFFFF00F)+0x00000000;
GPIO_PORTF_AMSEL_R = 0; // disable analog functionality on PF
PF2 = 0; // turn off LED
EnableInterrupts();
ST7735_SetCursor(6,0);
printf("C");
ST7735_SetCursor(13,0);
printf("ADC");
while(1){
PF1 ^= 0x02; // toggles when running in main
temperature = adcToTemp(ADCvalue);
ST7735_SetCursor(0,0);
ST7735_sDecOut2(temperature);
ST7735_SetCursor(9,0);
ST7735_OutUDec(ADCvalue);
}
}
开发者ID:jsnowboard,项目名称:EE-445L,代码行数:28,代码来源:ADCTestMain.c
示例15: main
// 3. Subroutines Section
// MAIN: Mandatory for a C Program to be executable
int main(void){
PLL_Init();
// 80 MHz
EnableInterrupts();
/*Initialize ports , ADC and timers*/
ADC0_InitSWTriggerSeq3_Ch1();
PortA_Init();
//SysLoad(T);
SysFun();
while(1){
/*Your code goes here*/
value=ADC0_InSeq3();
//PWMindex=(ADCvalue);
p=((value+1)*390)+800000;
//for(i=0;i<4;i++){
GPIO_PORTA_DATA_R|=0x20;
SysLoad(p);
GPIO_PORTA_DATA_R&=~0x20 ;
SysLoad(T-p);
//}
}
}
开发者ID:rajarajeswarie,项目名称:eds15m008,代码行数:35,代码来源:systick+dc+motor.c
示例16: main
int main(void){unsigned short score;
PLL_Init(); // Set the clocking to run at 80MHz from the PLL.
LCD_Init(); // Initialize LCD
LCD_Goto(0,0);
score =0;
long v2;
LCD_SetTextColor(255,0,0); // yellow= red+green, no blue
printf("score: %d", score);
LCD_DrawLine(10,16,310,16,BURNTORANGE);
Timer2_Init(4000000); // 20 times a second
Timer3_Init(7256); // 11.025 KHz
InitEnemy();
InitBunker();
InitPlayer();
InitMissile();
InitLaser();
Random_Init(1);
EnableInterrupts();
Fireflag=1;
while(1){
if(Semaphore){
DrawBuffer1();
Semaphore = 0;
}
}
}
开发者ID:asharma94,项目名称:SpaceInvaders,代码行数:27,代码来源:main.c
示例17: main
void main(void){
PLL_Init(); // running at 24MHz
DDRT |= 0x1F; // debugging outputs
PTT &= ~0x1F;
Debug_Profile(0); // 0 means initialization phase
Fifo_Init(); // Initialize fifo
OC0_Init(); // variable rate interrupt
ForeExpected = 0; // expected data
for(;;){
Debug_Profile(1); // 1 means start of foreground waiting
PTT_PTT1 = 0; // falling edge of PT1 means start of foreground waiting
while(Fifo_Get(&ForeData)==FIFOFAIL){
}
Debug_Profile(2); // 2 means foreground has new data
PTT_PTT1 = 1; // rising edge of PT1 means start of foreground processing
if(ForeExpected != ForeData){
Errors++;
PTT ^= 0x10; // critical section found
ForeExpected = ForeData+1; // resych to lost/bad data
}
else{
ForeExpected++; // sequence is 0,1,2,3,...,254,255,0,1,...
}
if((ForeData%10)==0){
Debug_Profile(3); // 3 means foreground has 10th data
}
}
}
开发者ID:NickCarneiro,项目名称:EE445L-Labs,代码行数:28,代码来源:Lab2g.c
示例18: main
int main(void){
uint8_t n; // state number
uint32_t Input;
PLL_Init(Bus80MHz); // initialize 50 MHz system clock
SysTick_Init(); // initialize SysTick timer
SYSCTL_RCGCGPIO_R |= 0x12; // activate clock for Port E and Port B
// allow time for clock to stabilize
while((SYSCTL_PRGPIO_R&0x12) == 0){};
GPIO_PORTB_DIR_R |= 0x3F; // make PB5-0 out
GPIO_PORTB_AFSEL_R &= ~0x3F; // disable alt funct on PB5-0
GPIO_PORTB_DEN_R |= 0x3F; // enable digital I/O on PB5-0
// configure PB5-0 as GPIO
GPIO_PORTB_PCTL_R = (GPIO_PORTB_PCTL_R&0xFF000000)+0x00000000;
GPIO_PORTB_AMSEL_R &= ~0x3F; // disable analog functionality on PB5-0
GPIO_PORTE_DIR_R &= ~0x03; // make PE1-0 in
GPIO_PORTE_AFSEL_R &= ~0x03; // disable alt funct on PE1-0
GPIO_PORTE_DEN_R |= 0x03; // enable digital I/O on PE1-0
// configure PE1-0 as GPIO
GPIO_PORTE_PCTL_R = (GPIO_PORTE_PCTL_R&0xFFFFFF00)+0x00000000;
GPIO_PORTE_AMSEL_R &= ~0x03; // disable analog functionality on PE1-0
n = goN; // initial state: Green north; Red east
while(1){
LIGHT = FSM[n].Out; // set lights to current state's Out value
SysTick_Wait10ms(FSM[n].Time); // wait 10 ms * current state's Time value
Input = SENSOR; // get new input from car detectors
n = FSM[n].Next[Input]; // transition to next state
}
}
开发者ID:kapil-utexas,项目名称:RTOS-from-bottom-up,代码行数:28,代码来源:TableTrafficLight.c
示例19: main
// 3. Subroutines Section
// MAIN: Mandatory for a C Program to be executable
int main(void){
PLL_Init();
// 80 MHz
// initialize output and interrupts
SysInit();
Port_Init();
// EnableInterrupts();
/*Initialize ports and timers*/
while(1)
{
for(j=80000;j<=160000;j=j+8000)
{
for(k=0;k<=3;k++)
{
GPIO_PORTA_DATA_R|=0x20;
SysLoad(j);
GPIO_PORTA_DATA_R&=~(0x20);
SysLoad(1600000-j);
}
}
}
}
开发者ID:GOWSHIKA,项目名称:eds15m004,代码行数:28,代码来源:sysdelay.c
示例20: main
// 3. Subroutines Section
// MAIN: Mandatory for a C Program to be executable
int main(void){
PLL_Init(); // 80 MHz
Sound_Init(); // initialize output and interrupts
EnableInterrupts();
while(1){ // interrupts every 500us
WaitForInterrupt();
}
}
开发者ID:OrlandoWzk,项目名称:TExaSware,代码行数:10,代码来源:SoftSound.c
注:本文中的PLL_Init函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论