Hey, I have one of these and want to change out the LED's with UV ones then move it slowly accross a Glow in the Dark surface to write text on the surface.
I am not adept at code yet but have successfully programmed it using the web tools and AVR dude. Where is the speed or cycle rate set on this? Any guidance would be greatly appreciated. There are a couple cool projects like this already but gotta build my own...
Jules
Sowing down the display...
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
-
- Posts: 1645
- Joined: Sat Nov 10, 2007 12:59 am
Re: Sowing down the display...
here is the part of minipov.c where the pov frequency is set.
you may want to increase the prescaler on the timer to slow things down enough.
for a slightly different approach already slowed down for uv output on a wall and a built in font with the output encoded in plain old ascii see http://theentropyworks.googlecode.com/files/menepov.zip.
Code: Select all
/*
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)
for a slightly different approach already slowed down for uv output on a wall and a built in font with the output encoded in plain old ascii see http://theentropyworks.googlecode.com/files/menepov.zip.
-
- Posts: 35
- Joined: Sun Feb 22, 2009 10:34 am
Re: Sowing down the display...
OK, I guess what I really need help with is how to edit the code then compile and get it in to the MiniPOV. I have succeeded with loading AVRdude onto my laptop and using some of the text generator programs to load text but... If I run AVRdude by itself I see it open then almost immediately close. I have downloaded Win AVR and a couple other programs but am floundering... I have programmed Arduino's and understand COM ports etc. Are there any tutorials on this that can help me?
Thanks, I'll get this one
Jules
Thanks, I'll get this one
Jules
-
- Posts: 12151
- Joined: Thu Apr 06, 2006 4:21 pm
-
- Posts: 35
- Joined: Sun Feb 22, 2009 10:34 am
Re: Sowing down the display...
My humble apologies. I can program it after following the tutorial. I loaded the original POV file then the eyebeam one. So now I have the "getting the ones and zero's" into the AVR. Now I need to figure out how to edit the c code and recompile. I'm on a mission and got up before the family to figure this out! LOL
Once again, you have been very gracious and helpful. I feel like a complete NOOB but I'm learning, and that is a good thing.
Once again, you have been very gracious and helpful. I feel like a complete NOOB but I'm learning, and that is a good thing.
-
- Posts: 35
- Joined: Sun Feb 22, 2009 10:34 am
Re: Slowing down the display... Success!
Well, I am getting somewhere! I edited the
TCCR1B = (1 << WGM12) | TIMER1_PRESCALE_64;
OCR1A = (uint16_t)10000;
I also loaded the cylon.c that is posted in the forums. Played with that changing values for the PWM etc. And I am getting somewhere. Now the real question is this? Any recommendations for a good book on C, C++, AVR's etc? I am really enjoying getting back into all of this and want to learn more.
Next step for me is to mount this on a rotating wheel and calculate the required speed for "printing with the UV" Ideally it would be synced to a speed sensor... Which leads me to the last question, how does one use the sensor input on the miniPOV?
Adafruit ROCKS!!!!!!!!!!!!!!!!!!
Many Thanks! It amazes me when you reply to a post within minutes of my posting. (And not jumping all over me for forgetting that I had already posted the question of slowing it down!)
TCCR1B = (1 << WGM12) | TIMER1_PRESCALE_64;
OCR1A = (uint16_t)10000;
I also loaded the cylon.c that is posted in the forums. Played with that changing values for the PWM etc. And I am getting somewhere. Now the real question is this? Any recommendations for a good book on C, C++, AVR's etc? I am really enjoying getting back into all of this and want to learn more.
Next step for me is to mount this on a rotating wheel and calculate the required speed for "printing with the UV" Ideally it would be synced to a speed sensor... Which leads me to the last question, how does one use the sensor input on the miniPOV?
Adafruit ROCKS!!!!!!!!!!!!!!!!!!
Many Thanks! It amazes me when you reply to a post within minutes of my posting. (And not jumping all over me for forgetting that I had already posted the question of slowing it down!)
-
- Posts: 1645
- Joined: Sat Nov 10, 2007 12:59 am
Re: Sowing down the display...
use a hall effect sensor connected to sensor pads on the minipov. attach a magnet to a non moving part of your device. every time the hall sensor goes past the magnet you will see a low pulse on port d pin 2 of the minipov.
i recommend kernighan and ritchie for c and the datasheet for whatever device you are programming. when i started programming avr's i spent a lot of time perusing the arduino sources to see how things were done. this'll give you an idea of the function of the uart, the timers and the a/d ports.
i recommend kernighan and ritchie for c and the datasheet for whatever device you are programming. when i started programming avr's i spent a lot of time perusing the arduino sources to see how things were done. this'll give you an idea of the function of the uart, the timers and the a/d ports.
-
- Posts: 35
- Joined: Sun Feb 22, 2009 10:34 am
Re: Sowing down the display...
Thanks! I am coding on the Arduino but want to do more so I will check the C resource out. The 8 pin tiny AVR's are screaming out for cool little projects.
Jules
Jules
-
- Posts: 1645
- Joined: Sat Nov 10, 2007 12:59 am
Re: Sowing down the display...
connect the hall sensor to digital pin 2 or 3 so you can use the arduino attachInterrupt function.
Please be positive and constructive with your questions and comments.