пятница, 17 октября 2008 г.

big crunch game




Labs:
So, last weekapos;s lab was pretty simple. Create a 7-segment display for whatapos;s called BCD. For those not familiar with either term, BCD is code for representing each digit in binary, 45= 0100 0101 for instance. Then a 7-segment display is what you find on your calculator or microwave to display numbers.

So implemented that with little trouble and got it done and off my desk in a relatively quick manner. This weekapos;s lab was not so fortunate.

This weekapos;s lab is to do 8-bit binary->seven-segment display. So the idea is that the circuit will display any number from 000-255 depending on the input. Now, to do this by hand for all 8 bits with a logic circuit would require some really nifty and time consuming tricks (not to mention 4 dimentional tables... *shiver*) which usually require some powerful computer programs to crunch out. So, instead you use whatapos;s called a ROM (read only memory). A ROM is programed to just give specific outputs for every input. In theory, each of these outputs could be completely random, if you programed the hardware to do so.

So, I do this weekapos;s lab which like I said before has to do 256 outputs for 256 inputs. As I also said, each of those outputs needs to be programed. ALL 256 entries need to be programed by hand. So here are the problems:

-Quartis wants the programed bits to be in hex. 7-segment only has 7 inputs (duh), hex requires 8. Is that last bit 0 or 1? Of course the lab doesnapos;t say so.

-Quartis wants these bits in a 32x8 matrix. Counting by 10 doesnapos;t fit well into this form. Copy paste is a no-go here.

So, first time I try this lab, I go with the assumption that the last bit is a 0, and program the matrix as so. To get an idea this is what it looked like.
0=40
1=79
2=24
3=30
4=19
5=12
6=02
7=78
8=00
9=18

So then the rest was just plug-and-chug. Inputting each of the values x y z style (128= 79 24 00). This process took about an hour and finally get it implemented on the board to comedic effect. If the test boards could burst into flames, mine would have. What a mess.

So, I spent 2 hours tonight reworking the matrix to go with the other assumption (that the last bit =1) and weapos;ll see if it works.

You can see my scratch work at: www.engr.colostate.edu/~jjpurcel/ECE102/Lab7_ROM/Lab7_scratch.xls thatapos;s the whole truth table and such. Iapos;ll be uploading Quartis screens later (like when it works and I have free time).

Wish me luck
~Lockefox

black nude star, big crunch game, big crunch pictures, big crunch theory, big crunch universe.



Комментариев нет: