Computer Science Canada 7 segment display |
Author: | stas054 [ Thu Jun 11, 2009 3:29 pm ] | ||
Post subject: | 7 segment display | ||
What is it you are trying to achieve? Hello everyone, I am making a test program with ultiple choice questiongs that works from a joystick I made. What is the problem you are having? I am having a problem with programming 7 segment display, it supposed to work as a countdown from 9 to 0 but it just puts random numbers and I don't get how it works exactly, can somebody explain to me? or give me a sample code for countdown on 7 segment from 9 to 0 using parallelput? Describe what you have tried to solve this problem I tried pretty much everything I found even putting something like parallelput(22) and it actually gave me numbers but I don't get the pattern
Please specify what version of Turing you are using 4.1.1 |
Author: | Tony [ Thu Jun 11, 2009 3:39 pm ] |
Post subject: | RE:7 segment display |
read the docs on parallelput. In brief, with parallelput(22), you are not putting 22, but the binary string that 22 represents 0010110 -- match up 7 bits to your 7 segments, and you should figure out the patterns that will draw digits on the screen. |
Author: | stas054 [ Thu Jun 11, 2009 3:53 pm ] |
Post subject: | Re: 7 segment display |
I got it now... but... I am only using 4 outputs so that would be 0000 for 0 0001 for 1, 0010 for 2 and so on, but it doesnt seem to work =/ |
Author: | stas054 [ Thu Jun 11, 2009 3:54 pm ] |
Post subject: | Re: 7 segment display |
I mean it works but I am getting random numbers not the ones I need |
Author: | stas054 [ Thu Jun 11, 2009 4:09 pm ] | ||
Post subject: | Re: 7 segment display | ||
this is what I did
but it doesn't work properly =( |
Author: | Tony [ Thu Jun 11, 2009 4:18 pm ] |
Post subject: | RE:7 segment display |
what do you mean it doesn't work properly? What do you expect to be the proper result, and how is the observed behaviour different? |
Author: | stas054 [ Thu Jun 11, 2009 4:21 pm ] |
Post subject: | Re: 7 segment display |
well it starts with 9 and then it displays random parts of the 7 seg... I don't understand why it does that if I look at the theory I have done everything correctly... |
Author: | stas054 [ Thu Jun 11, 2009 4:22 pm ] |
Post subject: | RE:7 segment display |
i want it to count... 9...8...7...6...5...4...3...2...1... |
Author: | stas054 [ Thu Jun 11, 2009 4:28 pm ] |
Post subject: | RE:7 segment display |
nvm I got it thanks xD |