EasyLogger on Mega48 problem

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
BarsMonster
Posts: 9
Joined: Wed Mar 03, 2010 9:30 pm

EasyLogger on Mega48 problem

Post by BarsMonster » Wed Mar 03, 2010 9:35 pm

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?

santacruzbob
Posts: 9
Joined: Wed Jul 01, 2009 11:14 pm

Re: EasyLogger on Mega48 problem

Post by santacruzbob » Mon Mar 08, 2010 8:42 pm

I don't think you can generate that clock internally on a chip without a PLL

BarsMonster
Posts: 9
Joined: Wed Mar 03, 2010 9:30 pm

Re: EasyLogger on Mega48 problem

Post by BarsMonster » Tue Mar 09, 2010 5:02 am

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?

BarsMonster
Posts: 9
Joined: Wed Mar 03, 2010 9:30 pm

Re: EasyLogger on Mega48 problem

Post by BarsMonster » Wed Mar 24, 2010 12:09 am

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...

BarsMonster
Posts: 9
Joined: Wed Mar 03, 2010 9:30 pm

Re: EasyLogger on Mega48 problem

Post by BarsMonster » Wed Mar 24, 2010 7:52 am

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.

Post Reply