News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

need of assembly code

Started by Shahjee, October 04, 2013, 11:17:48 PM

Previous topic - Next topic

Shahjee

Hello! I need a program of assembly language that I want to display letters from A to F on the common anode 7 segment by using 8051 micro controller, the program should run in this way that it should have switch on its port 1 (bit 0) i.e input and display on Port 0. Thanks

dedndave

start with the intel 8051 documentation
pay particular attention to boot-strap modes and how ports are assigned

then, find a free 8051 cross-assembler
in days past, i have used A51 - there are likely better ones out there, by now
read the documentation thoroughly

decide which 7-segment display you are going to use
some are common-cathode, some are common-anode
some have decimal points on the left, some on the right (probably most common)

you are likely going to assign one 8-bit port for the segments (with a bit for DP),
and another 8-bit port for digit strobe

if you are going to generate the values in the code - then you only need 2 ports
if you are going to read values from an external source, use a 3rd port for that
you can either use the digit strobe output to determine input digit
or, use another port for input digit decoding

the circuitry gets a little more complex if you use all 4 ports, so......
a good trick might be to use one port for both input and output digit strobe
rather than one-of-eight selection, use a 4-bit binary encoded value for each

you really aren't in the right forum for this
members of this forum are primarily interested in 32-bit and 64-bit windows OS applications
(that's x86 and ia64)

you want to find an 8051 forum and, perhaps, an electronics projects forum

hutch--

Also read the rules, we don't do requests. Go pay someone to write your software.

dedndave

 :biggrin:

i thought i'd give him the basic info and see if he could figure that out   :badgrin: