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.

need code help to display 3 digit notepad number in computer in 7 segment display

Status
Not open for further replies.

deva

Junior Member level 1
Joined
Aug 20, 2010
Messages
18
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Location
kathmandu
Activity points
1,389
Dear all

I need a code that displays 3 digit number in 7 segment display written in computer notepad via serial port using 8051 micro controller

ie
notepad 3 digit number --computer serial port -- micro controller-- 3 digit 7 segment display.
 

I don't really get exactly what you want but i'll suggest that you, use a Counter within that PIC, program it in such a way that it only displays desired digits as you say!

to display use

movf counter,w "move what's on the counter to workong register"
call convert "here you're calling for the codes used by segement"
movwf port "this is the port, output form the pic to segement"
 

hi, i dont know what is your project actually. and i think that it would be an alphabet that should be shown on 7 segment.
so here is what i suggest.
you should send three letters one by one from your computer to microcontroller. and ask your microcontroller to recognise them and show them on 7 segment.
you can send characters from your computer using hyperterminal. (builtin the windows xp version. and if you are using windows 7 you have to download it from internet)
here. you will use serial cable connecting your computer DB9 PORT with SERIAL port of your circuit board. this connector connects to max232 IC. this ic is used for serial communication. purpose. because, the serial data is at 9v and controller needs 5v. so simply it can be thought of as a voltage level converter. now the controller recognises the character. and show it on 7 segment.
HOW CONTROLLER RECOGNISE IT?
every letter has its ASCII code. this code has to be stored in your controller. now you can compare them in your code.
all the best of luck:)

- - - Updated - - -

i can give you some algorithm design:
>>>>
while(wait for data to come on serial comm port) OR use serial communication interrupt if your controller supports this.
void function_of_serial_comm()
{
if (data==a)
show a on 7 segment
else if(data==b)
show b on 7 segment


AND


SO


ON......
}
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top