hellllllllllllllllp about 7 segment

Status
Not open for further replies.
Just one!!! Its easy... two, three or four just ground through a separate port
 

Attachments

  • seven seg.PNG
    2.9 KB · Views: 186
im soooooooooo thnkx for u but can u tell methe code to operate by microbasic prog
i used it by decoder but there problem this code
program hh

' Declarations section
dim i as byte
main:
trisd=0
portd=0
i=0
for i = 0 to 9

portd.i=1

delay_ms(500)
next i
end.
 
You need a simple lookup table ...
Code:
  byte CONST LED_MAP[10] = {0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f};
to represent each number
 
I don't use micro basic but the lookup usually looks like this:

Code:
sub send( index as word)
   character = lookup(0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f), index
   PORTD = character
end sub

index = character to display
Microbasic's lookup will be different
 
Last edited:
Someone will help you if you show some interest. So far you've only shown you need the solution and that you don't care how it works. The circuit diagram was posted for you.

Do you know how a 7-segment display works?
Do you know how to write a value to a port?
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…