Help with an AVR version of the POV Display
Moderators: Chuckt, Garth, bitfogav
-
- 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
here it is.
OK this code doesn't work. (Just so you don't get frustrated trying to make it work)
OK 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.
Re: Help with an AVR version of the POV Display
All your PORTS are set as Outputs?. There dont seem to be a Input for the sensor?.
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.
Code: Select all
DDRA=0xFF;
DDRB=0xFF;
DDRC=0xFF;
DDRD=0xFF;
- brad
- 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
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?)
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?)
-
- 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
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.
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.
- brad
- 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
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/
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/
-
- 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
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.
Re: Help with an AVR version of the POV Display
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.
That would probably affect the optimizations of the AVR IDE.
-
- 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
Yes but I was initializing them within the while loop. I was initializing the variables every time it starts a new frame.
- brad
- 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
Unfortunately I don't think I would have picked that up unless it was a language I used myselfrobertrndya 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.
-
- 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
hehehe.....it didn't make much sense to us either. LOL
-
- 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
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?
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?
- brad
- 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
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
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
- sdudley
- 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
Ah, I see... You're neglecting your duties.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
Listen man, you need to get a grip on what's really important in life - ok!
Stacy
Any time you deviate from sequential consistency, you increase the complexity of the problem by orders of magnitude.
-
- 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
All the best with that brad...
- brad
- 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
Thanks everyone! (except for Stacy...)
Who is online
Users browsing this forum: No registered users and 5 guests