Help with an AVR version of the POV Display

Post here to discuss the 8x85 RGB LED POV Display.

Moderators: Chuckt, Garth, bitfogav

robertrndya
decided to stick around...
decided to stick around...
Posts: 39
Joined: Mon Apr 25, 2011 6:33 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Help with an AVR version of the POV Display

Post by robertrndya » Sat Jun 18, 2011 9:17 pm

here it is.


OK :roll: this code doesn't work. (Just so you don't get frustrated trying to make it work) :)
Attachments
code.rar
(316 Bytes) Downloaded 800 times
Last edited by robertrndya on Sat Jun 25, 2011 3:09 pm, edited 1 time in total.

User avatar
bitfogav
Moderator
Moderator
Posts: 915
Joined: Sun Mar 28, 2010 9:03 pm
Location: United Kingdom
Contact:

Re: Help with an AVR version of the POV Display

Post by bitfogav » Sat Jun 18, 2011 11:02 pm

All your PORTS are set as Outputs?. There dont seem to be a Input for the sensor?.

Code: Select all

 DDRA=0xFF;
 DDRB=0xFF;
 DDRC=0xFF;
 DDRD=0xFF;
Correct me if im wrong but Brads POV design had a sensor pick up, So when the sensor goes pass a nail the program then draws the data on the LEDs. you just have two For Loops that constantly draws the data on the LEDs.

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Help with an AVR version of the POV Display

Post by brad » Sun Jun 19, 2011 8:31 pm

Unfortunately I am struggling to follow your C code.

Have you had a look at bitfogavs suggestion? Have you tried going back to basics and instead of trying to make a picture appear - have you tried making sure that you have the correct data at the output? Have you checked that the eeprom is getting the correct info onto that address bus (I.E. it is not accessing a part of the eeprom that you have not programmed?)

robertrndya
decided to stick around...
decided to stick around...
Posts: 39
Joined: Mon Apr 25, 2011 6:33 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Help with an AVR version of the POV Display

Post by robertrndya » Mon Jun 20, 2011 3:44 pm

Hi Brad, I haven't checked the output of the eeprom manually. The eeprom contains data from 0000h-0E0Fh. 0000h-0707h contains the word "PUMA" and 0708h-0E0Fh contains the puma logo(Panther). But I feel I'm sure that it doesn't access unprogrammed memory because I've double and triple checked the memory locations while making the hex file of eeprom data. The 1st frame occupies the memory 0000h-0707h and 2nd frame occupies memory 0708h-0E0Fh. So for each frame the processor accesses 1800(decimal) memory locations(for i = 0;i <= 1799;i++).

And yes Bitfogav, all the ports are set as outputs. I haven't incorporated a sensor in my circuit. The main problem is that it's not displaying multiple frames. For displaying a single frame I have just 1 FOR loop that draws data constantly to the LEDs. That works fine. Just that the image keeps drifting round and round, but that's OK, not a problem for me. Now for displaying 2 frames i just copied the same FOR loop and pasted it again. And I used 2 more FOR loops {for (n = 0;n<2;n++)} to repeat each of the main FOR loops twice(i.e. to display each frame 2 times before moving on to the next frame). BUT I DID CHANGE THE STARTING MEMORY LOCATION for accessing the 2nd frame(a = 07h & b = 08h). But it just shows some random colors and the LEDs don't even blink. I tried making the processor run through both frame locations at 1 shot only (i.e. from 0000h-0E0Fh), which again is kinda like displaying just 1 frame, and that also worked fine. But I could see PUMA and the panther both together(like in 1 frame only). When I say I want to display multiple frames I mean that at 1 time it should display ONLY PUMA and at another time it should display ONLY the Panther. I feel there is a problem when I put the EXTRA 2 FOR loops (for repeating the same frame twice). But I can't understand WHAT EXACTLY is the problem. :( :cry: :cry: :roll: :cry: :cry: :(

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Help with an AVR version of the POV Display

Post by brad » Mon Jun 20, 2011 8:25 pm

Have you tried displaying each frame more than just twice? maybe at least ten or twenty times each. Sometimes it's very handy to go to the extreme (when all else fails)

Something that could come in VERY handy is a logic analyser, it will show you exactly whats going with your data bus / address bus and is a great tool for fault finding this sort of thing.

A good one is this:
http://www.saleae.com/logic/

robertrndya
decided to stick around...
decided to stick around...
Posts: 39
Joined: Mon Apr 25, 2011 6:33 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Help with an AVR version of the POV Display

Post by robertrndya » Wed Jun 22, 2011 3:18 pm

Alright, it started working. My friend was helping me with this problem, and he tried different things and at the end all he did is he copied the initializing statements and pasted them before the WHILE loop as well, i.e. the address variables (a & b), latch selecting variable (j), and the control ports (Port C & Port D). Now we have no idea how that makes a difference but it works that way. He just happened to try that out and to our surprise it worked.

User avatar
bitfogav
Moderator
Moderator
Posts: 915
Joined: Sun Mar 28, 2010 9:03 pm
Location: United Kingdom
Contact:

Re: Help with an AVR version of the POV Display

Post by bitfogav » Thu Jun 23, 2011 2:41 am

I see what you mean now, You wasn't initializing your variables before the main "While" loop.

That would probably affect the optimizations of the AVR IDE.

robertrndya
decided to stick around...
decided to stick around...
Posts: 39
Joined: Mon Apr 25, 2011 6:33 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Help with an AVR version of the POV Display

Post by robertrndya » Thu Jun 23, 2011 2:54 pm

Yes but I was initializing them within the while loop. I was initializing the variables every time it starts a new frame.

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Help with an AVR version of the POV Display

Post by brad » Thu Jun 23, 2011 10:03 pm

robertrndya wrote:Alright, it started working. My friend was helping me with this problem, and he tried different things and at the end all he did is he copied the initializing statements and pasted them before the WHILE loop as well, i.e. the address variables (a & b), latch selecting variable (j), and the control ports (Port C & Port D). Now we have no idea how that makes a difference but it works that way. He just happened to try that out and to our surprise it worked.
Unfortunately I don't think I would have picked that up unless it was a language I used myself :)

robertrndya
decided to stick around...
decided to stick around...
Posts: 39
Joined: Mon Apr 25, 2011 6:33 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Help with an AVR version of the POV Display

Post by robertrndya » Sat Jun 25, 2011 3:05 pm

hehehe.....it didn't make much sense to us either. LOL :wink: :lol:

robertrndya
decided to stick around...
decided to stick around...
Posts: 39
Joined: Mon Apr 25, 2011 6:33 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Help with an AVR version of the POV Display

Post by robertrndya » Thu Jul 14, 2011 3:35 pm

Hi Guys,

Its been a long time. The POV Display is working fine now. But I have to still spend sometime getting the right data from the software to put in the EEPROM.

Anyways, whats your latest project guys?

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Help with an AVR version of the POV Display

Post by brad » Fri Jul 15, 2011 9:59 pm

My latest project is renovating the new house we have just moved into!

When my new Super Pixel Bros Boards arrive I will test them out and document it though, until then I am painting, plastering, putting in new lights and all sorts of things like that :)

User avatar
sdudley
Moderator
Moderator
Posts: 337
Joined: Sun Mar 28, 2010 1:33 pm
Location: Florida, U.S.A.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Help with an AVR version of the POV Display

Post by sdudley » Fri Jul 15, 2011 10:31 pm

brad wrote:My latest project is renovating the new house we have just moved into!... I am painting, plastering, putting in new lights and all sorts of things like that :)
Ah, I see... You're neglecting your duties.

Listen man, you need to get a grip on what's really important in life - ok! :P

Stacy
Any time you deviate from sequential consistency, you increase the complexity of the problem by orders of magnitude.

robertrndya
decided to stick around...
decided to stick around...
Posts: 39
Joined: Mon Apr 25, 2011 6:33 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Help with an AVR version of the POV Display

Post by robertrndya » Sat Jul 16, 2011 4:26 pm

All the best with that brad... :lol:

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Help with an AVR version of the POV Display

Post by brad » Sat Jul 16, 2011 10:49 pm

Thanks everyone! (except for Stacy...)

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Who is online

Users browsing this forum: No registered users and 5 guests