fixed internal clock to 16Mhz
This commit is contained in:
parent
1c64b41a4d
commit
7dba052e88
@ -31,7 +31,7 @@ int fix_fft(char fr[], char fi[], int m, int inverse);
|
|||||||
real and imaginary samples in the complex array.
|
real and imaginary samples in the complex array.
|
||||||
*/
|
*/
|
||||||
int fix_fftr(char f[], int m, int inverse);
|
int fix_fftr(char f[], int m, int inverse);
|
||||||
static inline char FIX_MPY(char a,char b);
|
//static inline char FIX_MPY(char a,char b);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
18
main.c
18
main.c
@ -1,4 +1,4 @@
|
|||||||
#define F_CPU 1000000UL
|
#define F_CPU 16000000UL
|
||||||
|
|
||||||
#include<util/delay.h>
|
#include<util/delay.h>
|
||||||
#include<avr/io.h>
|
#include<avr/io.h>
|
||||||
@ -16,9 +16,18 @@ int main (void)
|
|||||||
int i;
|
int i;
|
||||||
char sample[128];
|
char sample[128];
|
||||||
char im[128];
|
char im[128];
|
||||||
struct cRGB led_bar1[1];
|
struct cRGB led_bar1[8];
|
||||||
//DDRB = (1<<mic);//would be setting output, default is input so no need for setting
|
//DDRB = (1<<mic);//would be setting output, default is input so no need for setting
|
||||||
//setupADC();
|
//setupADC();
|
||||||
|
for(i=0;i<8;i++)
|
||||||
|
{
|
||||||
|
led_bar1[i].r=10;
|
||||||
|
led_bar1[i].g=10;
|
||||||
|
led_bar1[i].b=10;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
while(1)
|
while(1)
|
||||||
{
|
{
|
||||||
@ -30,11 +39,10 @@ int main (void)
|
|||||||
}*/
|
}*/
|
||||||
//fix_fft(sample,im,7,0);//im[i] is always zero
|
//fix_fft(sample,im,7,0);//im[i] is always zero
|
||||||
led_bar1[0].r=0;led_bar1[0].g=100;led_bar1[0].b=10;
|
led_bar1[0].r=0;led_bar1[0].g=100;led_bar1[0].b=10;
|
||||||
ws2812_setleds(led_bar1,1);
|
ws2812_sendarray((uint8_t *)led_bar1,8*3);
|
||||||
|
|
||||||
_delay_ms(500);
|
_delay_ms(500);
|
||||||
led_bar1[0].r=255;led_bar1[0].g=0;led_bar1[0].b=10;
|
led_bar1[0].r=255;led_bar1[0].g=0;led_bar1[0].b=10;
|
||||||
ws2812_setleds(led_bar1,1);
|
ws2812_sendarray((uint8_t *)led_bar1,8*3);
|
||||||
_delay_ms(500);
|
_delay_ms(500);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user