Programming

Thread Starter

Kayne

Joined Mar 19, 2009
105
Hi Everyone


My question is If i was to display the number 12345 on a set of 5 LEDs connected to the parallel port B - PB0(lsb)toPB4(msb). When the displayed is on it will stay on for 5 seconds and then off for 2 seconds. Once all bar code patterns have been displayed the program will stop and the LEDs will be OFF.

Am I going about this question the right way, if i have not explained myself enough i will try again.

I have attached a TXT file with my assembly code



 

Attachments

Last edited:
I am not the correct person to answer the question as I have not ever done assembly code; however, could you state what your question or problem is with the design? I understand what you are trying to do with the LEDs. I do not have a clear understanding of what additional information you are looking for.
 

Ratch

Joined Mar 20, 2007
1,070
Kayne,

Am I going about this question the right way, if i have not explained myself enough i will try again.
What you really need to do is disclose what assembler/language you are using and for what CPU you are coding.

Ratch
 

Thread Starter

Kayne

Joined Mar 19, 2009
105
Thanks for the heads up probably is a good idea to tell you what processor i am using.
The assembler program i am using to write the code is called THRSim11 simulator software and the processor i am trying to program is the Motorola m68hc11.
 

Attachments

hgmjr

Joined Jan 28, 2005
9,027
Is this a "persistance of vision" (POV) project? I ask that because you mention that you write the number 12345 on a set of only 5 leds.

hgmjr
 

Skeebopstop

Joined Jan 9, 2009
358
Why not do it in C? So much easier.

Regardless. Just took a quick look. These are 7 segment displays no? That means you'll need 7 bits to represent any given number, I only see 5 in your code.

I'll go ahead and assume it is going through a decoder.

Regardless, can't do much more. Not a fan of assembly. I like the idea of technological progress getting us out of such nitty gritty.

Only the gurus at my work would argue, when they are able to optimize 3-4 instructions out of a real-time control loop, versus the C compiled version. I roll my eyes at them.
 

Thread Starter

Kayne

Joined Mar 19, 2009
105
Hi,
No its not a 7 segment display and there is no mention of POV for this. The question asks to display a bar code patterns, for each digit 12345. The Hexpat i have used are the binary code for digits 0-9, this is explained more in the attachment. I think that these binary numbers are what needs to display on a led.

Hopefully this helps more.
 

Attachments

Top