Inverted pulses to led matrix

Post here to discuss the original 8x8 Game System.

Moderators: Chuckt, Garth, bitfogav

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
tgraz34
decided to stick around...
decided to stick around...
Posts: 32
Joined: Tue Jun 08, 2010 12:14 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

Inverted pulses to led matrix

Post by tgraz34 » Wed Oct 20, 2010 7:27 am

Okay so i just got done building the 8x8 game system and i noticed a few problems. Ive only uploaded pong onto it for right now.


The problem is it looks like the 8bits being sent to the display are inverted like instead 11110011 it comes out as 00001100 i think.

The first picture is what the screen should look like and the second picture is what it looks like right now.

Im thinking it has something to do with the difference between brads newer 8x8 schematic and the older one. I have a feeling that inorder to make the newer 8x8 game system schematic work is by changing the code so that the 8bits are sent inverted to the 74373's. But i could be completely wrong.

Can someone please help me out and tell me why this is happening.

Untitled.png
Untitled.png (42.87 KiB) Viewed 15086 times
ccvxc.png
ccvxc.png (54.12 KiB) Viewed 15086 times

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: Inverted pulses to led matrix

Post by brad » Wed Oct 20, 2010 2:43 pm

Yep they certainly do look inverted!

All you need to do is to invert the data before it is sent from the W register to your output port. So just add this line before sending it:

Code: Select all

xorlw b'11111111'
You can also have a look at an earlier post I have made here:

viewtopic.php?f=20&t=33

tgraz34
decided to stick around...
decided to stick around...
Posts: 32
Joined: Tue Jun 08, 2010 12:14 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: Inverted pulses to led matrix

Post by tgraz34 » Thu Oct 21, 2010 6:59 am

I see how that little piece of code works but i just dont know where to put it, im still a n00b at programming. :(

I'm guessing somewhere in the draw_paddle or draw_ball subroutine. Could you maybe give me a hint to where it should go. :D

Thanks

tgraz34
decided to stick around...
decided to stick around...
Posts: 32
Joined: Tue Jun 08, 2010 12:14 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: Inverted pulses to led matrix

Post by tgraz34 » Sat Oct 23, 2010 8:02 am

UPDATE: i figured out where to put that little piece of code. It was kind of a no brainer.

Thank for your help. Now i can start working on adding a second player. :D

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: Inverted pulses to led matrix

Post by brad » Sun Oct 24, 2010 9:10 pm

Good work!

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
[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 6 guests