Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

plz [ i need it done by tomoroow !!] i need the code to multiplix 8x8 matrix diodes

Status
Not open for further replies.

apollololo

Newbie level 3
Joined
Dec 27, 2010
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,317
hello all
i have a project of a game !!
the main idea is to multiplix 8x8 diode matrix to the pic[pic 16f887a ]
The array is to be operated based on the same idea of 7-segment digit multiplexing, that is at any instant of time there is only one row of LEDs active while the others are off, enabling and disabling rows at fast rates will create the illusion that the array is lit at the same time
The track patterns are all to be stored into the EEPROM module
The tracks are to be stored and read from EEPROM. The tracks are
Page 2 of 3
Embedded Lab 0907334
built and stored as 8x8 grids, you can build many tracks (of the same level of difficulty) by choosing the sequence of grids in any orders you wish. You can construct this order by using look up tables which call the starting addresses of each grid in the EEPROM.
I HAVE DONE ALL THE HARDWARE WORK .. BUT STILL SO CONFUSED WITH THE MULTIPLIXING
ALL PROGRAMS SHOULD BE IN PIC ASSEMBLY language
PLZ HELP
 

Assuming you have the matrix connected to two 8-bit ports, all you do is enable one row and at the same time enable the bits representing the LEDs along that row on the port driving the columns. Then disable that row and enable the next one. Repeat until all 8 rows have been enabled and disabled then start over again.

Like all LEDs, what you have to do is put a voltage across it to make it light up. As the LEDs are connected between port pins, you have to make sure the bit on one side of the LED is high and the bit on the other side is low. In the matrix you will typically drive 8 LEDs at a time by making one side of all 8 LEDs high while driving the bit pattern for the other side on the other port.

Warnings:
1. Use resistors to limit the current on the rows or the columns, you don't need to limit it on both.
2. If you can, use the TRIS register to enable the output pins to the LEDS rather than driving them logic high and low. The reason - if you drive both sides, when turned off, an LED will have the supply voltage across it in the reverse direction and most LEDs will only withstand a few volts before being damaged. If you use the TRIS register to make an un-driven pin an input, the reverse voltage is minimized without having any effect on the display whatsoever.

Brian.
 

I have already done all the hardware ... used limiting current diodes and transistors ... I've connected the rows to port D & the columns to port B
there are 3 levels .. each level has a track
my main problem is I have to save each level tracks in EEPROM .. & read them from EEprom
what i have considered is to save the tracks in registers then when a level is selected ... i download the tracks to the EEprom
the reading subroutine from EEprom is in each level so i should write in in the Main routine
It is just that i need the code in PIC ASSEMBLY language
Thanks for Your Care =]
 

I'm still not sure of the format your data is in. What do you mean by "track" ?
If the EEPROM holds the bit map of each row, and they are held sequentially in the EEPROM memory space all you have to do is enable each row in turn, read 8 bits from the EEPROM, write them to the column and keep repeating.

Brian.
 


there is a car moving and trying to avoid crash with the tracks falling down
that is the game
yes the EEprm holds the rows values
but what is confusing me is :
suppose that i have let the odd rows first while the coulmns are all logic 1
then after a time delay i've let the even rows
how to make the tracks appear to bee falling down ??
which means .. make the odd rows values as the even ones then make the even as the odd
The top row value ?? how to manage that ?

---------- Post added at 19:25 ---------- Previous post was at 19:17 ----------

let : lit ****
 

I think I've found the Lab you referred to. If you gave us the reference it would have made things much easier to understand.

The processor specified is the PIC16x84 or PIC16x877A, you specified the 16F887 which is not allowed!
It also says if you get help you will be disqualified!

However, what I said about reading the track is still correct, you will have to scroll it though. The simplest way is to read bytes 0 to 7 into registers then display the bit pattern on the LEDs as I told you before. Then read bytes 1 to 8 and do the same. Each time you add one to the start and finish EEPROM address until you reach the end of the map. What you are doing is looking at an 8-bit by 8-byte window which you move across the track map in the EEPROM until you reach the end.

Overlay your 'vehicle' into the first column of data and use the logic AND function to see if its bit position is '1' at the same time as the map data is '1'. If they are both '1' you collided with the track.

Brian.
 
Thank u alot
i know this is a risk
but this is my final CPE subject and i have done the hardware part but still so confused with the code
Hope is all we have after all :)
Thanks
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top