Quantcast
Channel: MCS Electronics Forum
Viewing all articles
Browse latest Browse all 20564

BASCOM-AVR : Calibration 32Mhz atxmega128a3 : REPLY

$
0
0
Hi Davide, on my prototype i had no problem, but when is start production the board's i had similar problems my application communicatie is on 57k6 and i had also problems with communication, the difference in freq. was between 31 en 33.5 mhz on the board's. then when i modify the bootloader that is use for the board's the deference between the board's get smaller and the centre freq was around de 32mhz ( i don't now the exact value's anymore ) hier is the peace off code that i used [code:1:5921a8fb65] $crystal = 32000000 ' xmega128 is running on 32 MHz $regfile = "xm128a3def.dat" $lib "xmega.lib" ' add a reference to this lib 'first enabled the osc of your choice 'Config Osc = Disabled , 32mhzosc = Enabled 'internal 2 MHz and 32 MHz enabled Config Osc = Enabled , 32mhzosc = Enabled , 32khzosc = Enabled Osc_dfllctrl = &B00000000 'Enable DFLL and autocalibration Set Dfllrc2m_ctrl.0 Set Dfllrc32m_ctrl.0 Config Sysclock = 32mhz , Prescalea = 1 , Prescalebc = 1_1 Config Portc.7 = Output Portcfg_clkevout = 01 'output sysclk clock on PortC.7 [/code:1:5921a8fb65] i hope it wil help for you regards, Tiny

Viewing all articles
Browse latest Browse all 20564

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>