Hey guys, i built my own Euzebox on a prototype board and in general its working but i have got 1 problem. The video has got a wrong v-synch so i measured the frequency and had to realize, the avr is running on ca 10 mhz, but its on external clock of 28,6363 MHz. i think my fuse and lock bits are right but im not sure. furthermore i get sound but it sounds weird.
thanks for the help!
Avr too slow?
-
- Posts: 1486
- Joined: Mon Feb 11, 2013 8:08 am
- Location: Brisbane, Australia
Re: Avr too slow?
10Mhz is strange.
It is not the 8Mhz that it would be off the internal oscillator and it is not a fundamental freq of the xtal.
If you swap the 28mhz xtal out for a 20mhz one does your 10mhz measured output freq drop down to 7.14 ?
Also check if there is output with NO crystal present.
Those two things will let you know for sure the fuses are set for XT-HS etc
It is not the 8Mhz that it would be off the internal oscillator and it is not a fundamental freq of the xtal.
If you swap the 28mhz xtal out for a 20mhz one does your 10mhz measured output freq drop down to 7.14 ?
Also check if there is output with NO crystal present.
Those two things will let you know for sure the fuses are set for XT-HS etc
Re: Avr too slow?
I can't see any way it could be exactly 10mhz either.CunningFellow wrote:10Mhz is strange.
Do you actually have any kind of video output to the screen? As for the sound, if you start up a rom with music, does it just sound really slow(versus how it sounds in the emulator) or is it glitches/static? Also where exactly did you measure 10mhz or did you derive that from some calculation?
I really think it is fuse settings or circuitry(capacitors close enough to crystal?). Otherwise a small percent of the chips have troubles @ 28.636 so there is the possibility that the '644 you have doesn't play well with overclocking(is it a 644P?).
Re: Avr too slow?
first thanks for the quick answers.
Yeah i get an video, but its floating from top to bottom all the time, as i said, looks like the v-sync isnt correct. The music is just slow i think, couldnt check the actual sound in the emulator because i use win7 64 bit and the emu is not running for some reason.
I use an ATmega644P
i calculated the ~10 MHz and used an Osciloscope to measure at the xtal out, dont know 1 or 2.D3thAdd3r wrote:I can't see any way it could be exactly 10mhz either.CunningFellow wrote:10Mhz is strange.
Do you actually have any kind of video output to the screen? As for the sound, if you start up a rom with music, does it just sound really slow(versus how it sounds in the emulator) or is it glitches/static? Also where exactly did you measure 10mhz or did you derive that from some calculation?
I really think it is fuse settings or circuitry(capacitors close enough to crystal?). Otherwise a small percent of the chips have troubles @ 28.636 so there is the possibility that the '644 you have doesn't play well with overclocking(is it a 644P?).
Yeah i get an video, but its floating from top to bottom all the time, as i said, looks like the v-sync isnt correct. The music is just slow i think, couldnt check the actual sound in the emulator because i use win7 64 bit and the emu is not running for some reason.
I use an ATmega644P
Re: Avr too slow?
On pin 4 of the 644 my scope shows 14.3182mhz of course 1/2 division of the main clock and on pin 39 I have 60hz and pin 38 120hz and pin 37 1.92khz. If you are getting a stable 10mhz on pin 39, like Cunning was saying there are no divider settings possible that could get exactly 10 from 28.636. I'd wager you have a 20mhz crystal on there but this stuff isn't my specialty. It would be helpful if you could take some pictures of what the television is displaying.
Re: Avr too slow?
Here is what it looks like if i start the euzebox on my samsung tv
http://youtu.be/WExaq9r_MHE
http://youtu.be/WExaq9r_MHE
Re: Avr too slow?
Seeing parts of the space invaders logo that are supposed to be on the right side interlaced over parts on the left side almost looks like your scan lines are taking at least twice as long as they should(and the tv is doing it's best to interperet those long slow off time hsync signals).
Are you using AVRStudio or avrdude and what fuse settings do you have now? Are you definitely using a crystal or an oscillator and do you have a link to the datasheet for it? Did you try Cunning's idea of see if removing the crystal makes a difference? This will work out in the end, but hopefully Alec or another hardware guru chimes in soon. Try it on another TV if possible.Re: Avr too slow?
i also tried it on an Philips, but i lost my scart cable for it, but it looked similar, only it displayed all the time and the picture was all the time sliding downwards real quick
i use a crystal, it says MMD28.63636 GKF1
I didnt try removing it yet, what exactly would the consequence of it be? Don't understand the logic behind it
i'm using Bascom for programming purposes http://mcselec.com/index.php?option=com ... &Itemid=41
i use a crystal, it says MMD28.63636 GKF1
I didnt try removing it yet, what exactly would the consequence of it be? Don't understand the logic behind it
i'm using Bascom for programming purposes http://mcselec.com/index.php?option=com ... &Itemid=41
Re: Avr too slow?
One of the main possibilities is incorrect fuse settings. If you pull the crystal and it still runs then it means the fuse settings are telling it to run from the internal 8mhz oscillator inside the 644 as Cunning had said. What fuse settings are you using?anercomp wrote:I didnt try removing it yet, what exactly would the consequence of it be? Don't understand the logic behind it
This I found elsewhere on the forums and could be relevant and explain~10mhzSwinkels wrote:It seems that you are using third overtone crystal and your AVR is running with about 9.5MHz. Try other 28,6363 MHz fundamental frequency crystal.
To avoid confusion with differnt crystals type I recommend using integrated oscilator. With the external clock source any AVR will overclock much more stable.
Re: Avr too slow?
i use the fuse setting "ext. fullswing osc." i was told this is the right one for my use.
I heard this one before, i think its the best idea to buy an oscillator instead of another bunch of crystals. Thanks!D3thAdd3r wrote:This I found elsewhere on the forums and could be relevant and explain~10mhzSwinkels wrote:It seems that you are using third overtone crystal and your AVR is running with about 9.5MHz. Try other 28,6363 MHz fundamental frequency crystal.
To avoid confusion with differnt crystals type I recommend using integrated oscilator. With the external clock source any AVR will overclock much more stable.