Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

7 segment 2 digit by 16f877a

Status
Not open for further replies.

ao_007

Newbie level 2
Joined
Nov 23, 2008
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,289
sorry, i want example code 7 segment 2 digit
file.pbp
 

hi ,ihave code for jal you can find the compiler from net.its free
Code:
include 16f84_4
include jlib

port_b_direction = all_output
port_a_direction = all_output
var byte d1 = 0,d2 = 0,d3 = 0,d4 = 0

procedure arttir is
d1 = d1 + 1
if d1 == 10 then
   d1 = 0
   d2 = d2 + 1
if d2 == 6 then
   d2 = 0
   d3 = d3 + 1
    if d3 == 10 then
       d3 = 0
       d4 = d4 + 1
     end if
   end if 
end if
if d4 == 2 & d3 == 4 then d3 = 0 d4 = 0 end if
end procedure

procedure tara is
 port_a = 0
for 10 loop
 port_b = seven_from_digit ( d1 )
 pin_a0 = high
 delay_5ms
 pin_a0 = low
 port_b = seven_from_digit ( d2 )
 pin_a1 = high
 delay_5ms
 pin_a1 = low
 port_b = seven_from_digit ( d3 )
 pin_a2 = high
 delay_5ms
 pin_a2 = low
 port_b = seven_from_digit ( d4 )
 pin_a3 = high
 delay_5ms
 pin_a3 = low
end loop
end procedure

forever loop
 arttir
 tara
end loop
**broken link removed**
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top