Discussion in "8051 Discussion Forum" started by    sks    Sep 19, 2008.
Fri Sep 19 2008, 02:56 pm
#1
thank u very much mr pundalik a.k.a. pdi33. u have given me a great pleasure to mail and guide me to use the site. i love electronics, i always experiment with new technology as right now i am working in media designing pipe line for post production studios in orissa. whenever i find time i do make myself busy with electronics. that give me energy. i may be old physically but i am very young mentally. god bless u all people. i am very happy to say u all r helping other people by guiding properly without anything, that's a great & noble idea.
any way i am working on a object counter project. i can make the counter Hardware using discrete ics but i want it on uc as it can be don with less components. i can write code for a single digit counter using a switch as input , 7seg display as display. i don't know how it can covert to multiple digits, i want the device should count up to 9999 , all the display should be multiplexed. a switch can be used as input in every press of the switch the counter has to increment by 1, when it reaches 9999 it has to stop. then restart again by another sw press. i am sorry fora lengthy mail .thanks all again
s.k.sahoo
Fri Sep 19 2008, 05:30 pm
#2
hi
you can download the project from link
i write this code with bascom8051 and change to asm for you
http://www.2shared.com/file/3955362/782373c3/project.html
can you download from 2shared?
bay
 sks like this.
Fri Sep 19 2008, 11:38 pm
#3
Hi sks, welcome to website We all try to do our best. And Hope you learn a lot from here

Please keep 1nafar's code as reference, i suggest you to try it on your own so that it helps you better way. If you have any doubt doesnt matter small or big simply post here.
 sksAmit singh like this.
Sat Sep 20 2008, 12:06 am
#4
btw, i checked the simulation file of nafar and it seems to be a time counter(timer) instead of object counter. So u will have to do a little modifications i the ciruit provided by him especially about intrducing the opto coupler part as u had referred to it in the chat box description ( if remember correctly).
for the optocoupler, i suggest u use the simplest one which is the TL817 4pin opto.
u can refer in the download section for 7 segment interfacing circuit ( u will require multiplexed one for ur project .)
try finalising the circuit first before starting coding.
good luck,
regards,
:-)

P.S.: another important aspect for object counting (if u r going to use it in a practical application in future) is the storage of the last count on power failure so that u can continue from the last count onwards. Please confirm whether that condition is required for ur apliction and i can suggest u a solution for it.



[ Edited Sat Sep 20 2008, 12:09 am ]
 sks like this.
Sat Sep 20 2008, 11:37 am
#5
Thanks Ajay, i have inafar's project file there was Proteus project file along with codes written in basic ,hex file and a list file etc . i have simulated that in Proteus, it is a time counter. ok whatever it may be i had followed his source code in the list file but sorry to say i couldn't follow completely as it doesn't have comments. as i have said i am new to uc i will love to know in details like how u people write algorithms and the codes. please guide. thanks again
s.k.s
Sat Sep 20 2008, 12:06 pm
#6
Hi Mr pdi33, thank u for ur reply, comments, and queries. yes Inafar's project is a time counter i had simulated in Proteus i can modify the circuit and post. u have said correctly i have to store data in external memory if power fails or for other reasons. i think a 24c04 will solve the problem i don't know what u suggest. actually it is a practical project i will use a 4*4 matrix key pad to input the required base value. when i start the hardware all 4 display has to be in off mode , i may enter any value like 0000, 34 or 100 in hex keypad which has to be displayed after that i have to press an enter key which will be a part of hex keypad to start the counter it has to count above the entered value and stops at 9999. Mr Ajay has advised me to follow Inafar's code but i could not follow his code, i want to learn pl help me from ALGO to CODE writing. i know it may be a hard task for u but if u can pl guide me young man. i don't know what u do, do u have time or not. pl reply. thank again
sks
Sat Sep 20 2008, 02:39 pm
#7
Hi Mr ajay, sorry to disturb u people, but i want to learn programming. i have followed the code of Mr Inafar but it is hard to understand on part fully.
let us go slowly, i have some questions
1: if we write ORG 00H is it reset all and goes to starting of all locations or starting of only memory location ?
2: if we write ORG 0BH is it reset time counter0 ?
3: i don't follow this ORG 33H, 36H is it starting of (general purpose) scratch pad location of internal RAM?
4: in line x004b he has written mov 20h,#0 is it decimal 0 will be loaded at bit addressable location of RAM
I don't know uc language correctly i am trying to learn, i write very small codes. i have never used interrupt or counter of 8051, some people write delay routine using timer but i write delay routine using LOOP technique.
i will appreciate if u help me to complete this project. thanking you once again. i am sorry but i want to learn
sks
Sat Sep 20 2008, 02:51 pm
#8
Hi Mr 1nafar, thank u for ur help. i am glad to know u have taken pain to disassemble the code and mail me to help me out. god bless u people, but i could not follow completely as there are no comments and subroutine names i don't know what u call it (x0036). if u want to help me pl send me the ALGORITHM of ur code by which i will try to understand it. u have used direct bit addressable method and used interrupts i am not used to it as i am starting learning recently. thanks again
sks
Sat Sep 20 2008, 11:18 pm
#9

hello SKS,

we respect your interest and appreciate your Zeal to learn Micros. please don't be in a hurry, my advice would be to first get hold of a good micro book like Kenneth Ayala or mazidi and soak you self into the basics of code building, try some small projects to familiarize with concepts and then move on to more complex projects.

Arun
 sks like this.
Sun Sep 21 2008, 02:47 am
#10
Hello sks

As Arun says the best place to start is with a good book,
(or several good books) and simple experiments.

Trying to understand someone else's code, without good commenting
is very hard.
I wouldn't bother, you'll just get a headache

Good luck anyway.



[ Edited Sun Sep 21 2008, 02:50 am ]
 sks like this.

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

Lewisuhakeply
Thu Apr 18 2024, 06:00 pm
Darrellciz
Thu Apr 18 2024, 11:07 am
Charlessber
Thu Apr 18 2024, 09:29 am
BartonSem
Thu Apr 18 2024, 04:56 am
DonaldKnown
Thu Apr 18 2024, 12:24 am
utaletxcyw
Wed Apr 17 2024, 10:21 am
Anthonyvab
Wed Apr 17 2024, 08:48 am
RobertCix
Wed Apr 17 2024, 06:46 am