Page 1 of 1

EasyLogger on Mega48 problem

Posted: Wed Mar 03, 2010 9:35 pm
by BarsMonster
Hi, I am trying to run EasyLogger on Mega48 without crystal.

I've changed clock to 12.8Mhz:
#define USB_CFG_CLOCK_KHZ (12800)

Also, I've changed port I am connecting to (D).

For the beginning I've commented all ADC-related stuff to keep things simpler.

Unfortunately, it does not work - windows shows that USB device unrecognied over and over again (i.e. I do not disconnect device, windows just continue to pop that message).

Any hints on making it work on Mega48 without Crystal?

Re: EasyLogger on Mega48 problem

Posted: Mon Mar 08, 2010 8:42 pm
by santacruzbob
I don't think you can generate that clock internally on a chip without a PLL

Re: EasyLogger on Mega48 problem

Posted: Tue Mar 09, 2010 5:02 am
by BarsMonster
santacruzbob wrote:I don't think you can generate that clock internally on a chip without a PLL

Wait, but there were reports that it is possible to calibrate RC oscilator for that clock?

Re: EasyLogger on Mega48 problem

Posted: Wed Mar 24, 2010 12:09 am
by BarsMonster
Just a heads up: I just validated that my Mega48V works fine on the OSCCAL range 0-255 @3.3v.
So the question is does it reach 12.8Mhz at high range of OSCCAL (visually difference between 0 and 255 is about 4x)...
I'll try to work on measuring & displaying current clockrate based on RC calibration code...

Re: EasyLogger on Mega48 problem

Posted: Wed Mar 24, 2010 7:52 am
by BarsMonster
Full success :-D
It appeared that I just didn't programmed fuse to make default RC clock 8Mhz instead of factory's default 1Mhz :-)
Autocalibrated value appeared to be 0xF1 - 0xF2, and it works in the range 0xEF-0xF6 (Another topic about that) for both 3,3 and 5v power supply (Yeah, 48V version worked at 12.8Mhz at 3.3v).

The only issue is that Windows7 @3.86Ghz takes a little longer to initialize device vs Windows 98 @200Mhz, so very first message is missed on W7.