Sowing down the display...

MiniPOV, MiniPOV2 and MiniPOV3

Moderators: adafruit_support_bill, adafruit

Sowing down the display...

Postby DJ4MC » Sat Jan 23, 2010 7:35 pm

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
DJ4MC
 
Posts: 35
Joined: Sun Feb 22, 2009 9:34 am

Re: Sowing down the display...

Postby mtbf0 » Sun Jan 24, 2010 8:33 am

here is the part of minipov.c where the pov frequency is set.

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)


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.
"i want to lead a dissipate existence, play scratchy records and enjoy my decline" - iggy pop, i need more
User avatar
mtbf0
 
Posts: 1642
Joined: Fri Nov 09, 2007 11:59 pm
Location: oakland ca

Re: Sowing down the display...

Postby DJ4MC » Sat Jan 30, 2010 10:45 pm

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
DJ4MC
 
Posts: 35
Joined: Sun Feb 22, 2009 9:34 am


Re: Sowing down the display...

Postby DJ4MC » Sun Jan 31, 2010 7:52 am

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.
DJ4MC
 
Posts: 35
Joined: Sun Feb 22, 2009 9:34 am

Re: Slowing down the display... Success!

Postby DJ4MC » Sun Jan 31, 2010 8:56 am

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!)
DJ4MC
 
Posts: 35
Joined: Sun Feb 22, 2009 9:34 am

Re: Sowing down the display...

Postby mtbf0 » Sun Jan 31, 2010 4:37 pm

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 want to lead a dissipate existence, play scratchy records and enjoy my decline" - iggy pop, i need more
User avatar
mtbf0
 
Posts: 1642
Joined: Fri Nov 09, 2007 11:59 pm
Location: oakland ca

Re: Sowing down the display...

Postby DJ4MC » Sun Jan 31, 2010 9:36 pm

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
DJ4MC
 
Posts: 35
Joined: Sun Feb 22, 2009 9:34 am

Re: Sowing down the display...

Postby mtbf0 » Sun Jan 31, 2010 11:42 pm

connect the hall sensor to digital pin 2 or 3 so you can use the arduino attachInterrupt function.
"i want to lead a dissipate existence, play scratchy records and enjoy my decline" - iggy pop, i need more
User avatar
mtbf0
 
Posts: 1642
Joined: Fri Nov 09, 2007 11:59 pm
Location: oakland ca


Return to MiniPOV

Who is online

Users browsing this forum: No registered users and 6 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [103]

Raspberry Pi[80]
 
FLORA[23]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[11]
Arduino[60]
 
NETduino[14]
 
BeagleBone[24]
 
Android[6]
 
XBee[10]
More Dev Boards[30]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[33]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[8]


 
Breakout Boards[33]
LCDs & Displays[48]
Components & Parts[69]
Batteries & Power[49]
EL Wire/Tape/Panel[52]
LEDs[109]
 
Wireless[14]
Cables[61]
 
Lasers[6]
Sensors/Parts[145]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[70]
 
iDevices[13]
Tools[71]
 
Wearables[39]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[24]


 
Stickers[41]
 
Skill badges[55]
 
Books[25]
 
Circuit Playground[7]
 
Gift Certificates[4]