ATTINY FUSE SETTINGS
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
-
- Posts: 37
- Joined: Sat Dec 15, 2007 2:35 am
ATTINY FUSE SETTINGS
I am wondering if anyone knows some stuff on this pov stuff. Its extremely hard to see the image this makes. If i burn the fuse to requested makefile reading , its almost impossible to see message, unless im moving my arm at 100 miles/hour. So I end up setting fuse back to 64 for slower clock, Im assuming. Best clock fuse setting to see the image easily? Are there some kind of optimal fuse settings?
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: ATTINY FUSE SETTINGS
0x64 enables the divide-by-8 on the system clock. That's the only fuse setting that will make any kind of difference to what you see.
-
- Posts: 37
- Joined: Sat Dec 15, 2007 2:35 am
Re: ATTINY FUSE SETTINGS
adafruit_support_rick wrote:0x64 enables the divide-by-8 on the system clock. That's the only fuse setting that will make any kind of difference to what you see.
Hi rick, thanks for the quick reply. I dont exactly understand what you mean. 0x64 is the 'safe' default for the attiny2313 chosen by avrdude. If I use the makefile given with the firmware it sets to EF or something, which makes the message almost unreadable unless Imove my hand at 100 miles/hour.. I understand its the fuse setting that makes a difference to what I see, as I can see it and stated it in the original question, my question was what is the best fuse settings to see the image better, as the one in the makefile seems to be ridiculous to see an image with unless you are moving your hand at 100miles/hour.
Has anyone tried putting different fuses in and experimented which works best at what arm speed/velocity to see the image better? I guess this is getting into the Spike POV territory, but I dont want to put a sensor and just would like to better see the image.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: ATTINY FUSE SETTINGS
There are only two options for the low fuse setting that will affect the speed you have to move the minipov. 0x64 will slow the whole thing down by a factor of 8 over the out-of-the-box setting, which is 0xE4. The rest of the fuse bits should not be altered in any way.
-
- Posts: 37
- Joined: Sat Dec 15, 2007 2:35 am
Re: ATTINY FUSE SETTINGS
thanks rick, so those are the only hardware options. Is there anything in the firmware I can alter to change timings? Could you possibly go through the code step by step explaining everything it does? If anyone has any ideas on timings, or sensors I guess, and how to interface, would appreciate it very much. I have mounted my miniPov3 on a stick with a piece of metal, and spin it around really fast to make a message, great for parties.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: ATTINY FUSE SETTINGS
In the firmware, have a look at the file minipov.c. You can adjust the speed by changing the TIMER_PRESCALE constant in function main():
As you can see, the code is set for TIMER1_PRESCALE_1, which should be the fastest setting. TIMER1_PRESCALE_8 would be 8 times slower. The possible options are:
Code: Select all
int main(void) {
DDRB = 0xFF; // set all 8 pins on port B to outputs
/*
the frequency of the interrupt overflow is determined by the
prescaler and overflow value.
freq = clock_frequency / ( 2 * prescaler * overflow_val)
where prescaler can be 1, 8, 64, 256, or 1024
clock_freq is 8MHz
and overflow_val is 16bit
the overflow value is placed in OCR1A, the prescale is set in TCCR1B
so for example:
A good POV frequency is around 400Hz
desired freq = 400Hz
clock freq = 8MHz
8MHz / (400Hz * 2) = 10000
since 10000 is less than 655536 (largest 16 bit number)
OCR1A = 10000 and the prescale is 1
*/
TCCR1B = (1 << WGM12) | TIMER1_PRESCALE_1;
OCR1A = (uint16_t)10000;
TIMSK |= 1 << OCIE1A; // Output Compare Interrupt Enable (timer 1, OCR1A)
sei(); // Set Enable Interrupts
while (1);
}
Code: Select all
#define TIMER1_PRESCALE_1 1
#define TIMER1_PRESCALE_8 2
#define TIMER1_PRESCALE_64 3
#define TIMER1_PRESCALE_256 4
#define TIMER1_PRESCALE_1024 5
Please be positive and constructive with your questions and comments.