logo

Select Sidearea

Populate the sidearea with useful widgets. Itโ€™s simple to add images, categories, latest post, social media icon links, tag clouds, and more.
[email protected]
+1234567890
 

2.3.2. Writing multi number to single 7 Segmen consecutively

Step 1st
Build the circuit as shown in figure 2.3.2. As you seen on figure 2.3.2. P2.0 is connected to driver transistor, and each pin of 7 segmen is connected to P0.0 trough P0.6. Remember, that all we want to do with this lesson is write multi number ( 1-2-3-1-2-3 and so on ) to 7 segmen as consecutively.

Step 2nd
In this step, you must tipe the assembly program to make your 7 segmen shown a number on 7 segmen, we assume that you have already known the editor, we used MIDE-51 to edit the program. ( Download File : exp232.zip )

       org 0h
start: mov P2,#11111001b; send high logic to a and b segmen       clr P0.0         ; send current to 7 segment
call delay       ; call delay time
mov P2,#10111011b; send high logic to a,b,d,e,g seg.       clr P2.0         ; send current to 7 segment
call delay       ; call delay time       mov P2,#01110000b; send high logic to a,b,c,d,g seg.       clr P2.0         ; send current to 7 segment       call delay       ;call delay time
sjmp start       ; jump forever;=============================================
;subroutine delay created to rise delay time
;=============================================
delay: mov R1,#255
del1:  mov R2,#255
del2:  djnz R2,del2
djnz R1,del1
ret       end

Step 3rd
Safe your assembly program above, and name it with 7seg2.asm (for example) Compile the program that you have been save by using MIDE-51, see the software instruction.

Step 4th
Download your hex file ( 7seg2.hex ) into the microcontroller by using Microcontroller ATMEL ISP software, see the instruction.After download this hex file you’ll see the action of the 7 segmen( of course if your cable connection and your program are corrected ).

2.3.3. Writing multi number to single 7 Segmen consecutively

As what you have been worked out in lesson 2.3.2, in this lesson you should write some number ( 0,1,2,3,4,5,6,7,8,9 ) to 7 Segmen. Of course it’s very simple one, you are just copy and paste for couple time, and editing for the data.

2.3.4. Writing multi character to single 7 Segmen consecutively

As what you have been worked out in lesson 2.3.3, in this lesson you should write some character ( A,b,C,d,E,F,G,H,I,J ) to 7 Segmen. Of course it’s very simple one, you are just copy and paste for couple time, and editing.