Discussion in "Project Help" started by    Severus    Jun 5, 2007.
Thu Jun 07 2007, 04:06 PM
#11
just click on the thank button lol kidding.. its ok brother.. my site, i made it for this purpose only.. for everyone who want any kind of help i am happy that i am able to help you.

ok.. now regarding keypad.. you have to write a small program.. just to read and display the value from keypad. so is like this way...
we have 4 rows, and 3 columns. we will scan the rows one by one...
well i dont know the keypad is constructed, but i will just give you some idea... according to design there in my mind.
you make R0 = 1, by setting the pin connected to row 0 of keypad. then sense the columns connected to PortB for 0. if any of the column is zero then key is pressed.
e.g.
you have pressed number 2. so while sensing... you make R0 = 1 and you read from Port B. you get a value 0x05 it will be better if you AND the read value from Port B with 0x07 so you will just get the value of Pins connected to columns only, reduces the error.
so in binary we will get a value B'00000101' C0 = 1, C1 = 0 and C2 = 1
i.e. in row 1 key 2 is pressed. this way we will do the scan. so when reading from keypad, you make the rows One, one by one first R0 then read the column, then R1 and read the column, then R2, then R3...
i hope you understood the concept of scanning and reading the keypad.
try making a small program just to scan and display the value.. i hope you know how to decode the value for 7-segment. if not then tell me i will explain it here.. :-)
 Severus like this.
Thu Jun 07 2007, 04:26 PM
#12
Thank you , and u have a great site indeed, and i wrote a program that reads a number and display, my problem is to do the math work, how can i let it do the math work ???
Thu Jun 07 2007, 04:30 PM
#13
thank you brother, ur site is great indeed, and it helped me alot, i wrote a program to get a number , then display it , i wrote this, but the problem am now in is to write the assembly cde to do the math , thats the problem , can u help me ???
Thu Jun 07 2007, 06:36 PM
#14
ok.. now its really simple.. get one number and store it in a register and then get second number.. put it in accumulator.. and simply apply maths.. i think we have instructions for that.. isn't it?
you can do one thing.. more.. like.. press a number and then to confirm the first number press #
and then second number and then # to save the second one..
now press * to select the math function, e.g. if pressed once +, pressed twice then -, thrice * and fourth time ÷
after selecting the function press # to get the result... i think its really simple..
try the simple + and - functions for now.. and tell me the results..
 Severus like this.
Thu Jun 07 2007, 07:03 PM
#15
LOOOL , not easy at all, How do u do that the confirm after the number , and to recognize that it confirmed , and then take the operation and recognize it , am afraid am not that good with the 8086/8088 assembly , can u show me a sample , please

Regards
Thu Jun 07 2007, 07:45 PM
#16
LOL you dont have to thank me eveytime...
bro, i don't remember 8086 programming anymore, really.. but as i know controllers so i am explaining you the concept or the basic behind it..
ok.. lets put it this way.. you said that you are able to get the i/p from keypad in your previous post right?
so.. you can also store the i/p received right?
and.. u can put this keypad routine in a subroutine so whenever you need to read from keypad you just call this routine, µP will work in µSecs so will be faster to process the routines..
what i want is this way.. (i give you the steps because i don't know assembly sorry for this )

clear the register on which number to be stored
get_num:
display number (will be zero in this case. coz starting)
call keypad_routine
store the received number
display it
check if pressed key is #
if yes save the number to some location and jump to second_num
if no then jump back to label get_num: and get the key and current pressed number will be there on the display as well as in the register where u want to store it.
second_num:
same as we did above,
but now we will wait for either #or * to be pressed..
make only + for now..
so if u press * + is selected and then press # to get result.

I am trying my best to explain.. but i really don't have any idea how to do this in microprocessors.. but i am sure you will do it..
please try writing something like what i explained above i am sure you will reach somewhere
 Severus like this.
Fri Jun 08 2007, 10:12 AM
#17
ex,we're talking about microprocessor or microcontroler.Microcontroler,i believe.there are some differences between them.but why do sevenus use 8086 assembly.i think we must use Read51
Fri Jun 08 2007, 10:23 AM
#18
it might be his assignment work... I am happy he is doing on his own.. i mean i am just guiding.. not giving the codes.
he has a course to do.. so it comes under it.. so is ok.. the way it is..
Fri Jun 08 2007, 10:43 AM
#19
Wind, its microprocessor , and yes its a project for the microprocessor , and i thank Rickey Deeply , cause without him i didnt know where to start , and what to do, he he did a great guidance for the thing, and i have him as a reference at the end of the project documentation
and i think its OK, asking some one, since he didnt give me any code , or hardware EWC
Fri Jun 08 2007, 10:53 AM
#20
yes u gave you just the guidance.. and u understood my point on the mail perfectly.. and i am very happy!!
that you doing everything on your own..

Get Social

Information

Powered by e107 Forum System

Conversation

Sat May 15 2021, 11:47 AM
Derek Wolcott
Geometric Energy Corporation announced the dogecoin-funded mission on Sunday, with DOGE-1 representing a 40 kilogram cube satellite flying as a payload on a Falcon 9 rocket.
Thu May 13 2021, 07:18 PM
Rufus
Pretty section of content. I just stumbled upon your weblog and in accession capital to assert that I get actually enjoyed account your blog posts. Any way I will be subscribing to your augment and even I achievement you access consistently quickly. https://mkfinstitute.com Trisha Trisha
Wed May 12 2021, 01:23 PM
Jed Roan
Now you can promote your site all over the internet for FREE: http://www3.listofsitesthatacceptfreeads.club
Wed May 12 2021, 08:20 AM
Edgardo
If some one wants to be updated with most recent technologies afterward he must be visit this web page and be up to date every day. annual credit report https://creditscoresetf.com
Wed May 12 2021, 06:11 AM
Laurinda
Great website. A lot of useful information here. I'm sending it to some pals ans also sharing in delicious. And of course, thanks on your effort! annual credit report https://creditscorecheckn.com

Downloads

Comments

Mirza123
Thu Jun 25 2020, 03:46 PM
eunicelove124
Mon Jun 22 2020, 03:03 PM
cerouno
Tue Jun 16 2020, 05:10 PM
Marce
Sat Jun 13 2020, 09:43 PM
Davidthils
Thu May 21 2020, 12:44 PM
Jakeror
Thu May 21 2020, 01:28 AM
motorCar
Wed May 20 2020, 07:05 PM
Vordrync
Wed May 20 2020, 11:52 AM

Online

Guests: 105, Members: 0 ...

most ever online: 182184
(Members: , Guests: 182184) on 06 Aug 2010: 05:37 AM

Members: 38215
Newest member: Mirza123