Discussion in "Project Help" started by    cenadius    Aug 19, 2007.
Tue Sep 16 2008, 04:45 PM
hmmm, yeah i was thinking about the delay part but unfortunately i am inexperienced in the 7 segment programming part cause even my friends and seniors here failed to solve it.

if its possible that maybe you all can help me write the programme for the reducing the delay for the 7 segment? if not i have to wait till my next semester starts again to ask my assembly professor about this:(

sorry for the trouble though.

by the way, the project is working perfectly fine with the fan and sensor but only the 7 segment is kinda annoying blinking in the eyes...LOL

[ Edited Tue Sep 16 2008, 04:47 PM ]
Tue Sep 16 2008, 05:51 PM
in the delay routine written by ajay,
        mov r6,#20
        mov r5,#255
        djnz r5,$
        djnz r6,wait

change the counter:
mov r6,#20 to say
mov r6,#10

if u find some improvement, try reducing the delay further till u get a steady display.
note that decreasing the delay has a catch that it will also increase the frequency of the ADC readings and may lead to some fluctuation as both the ADC reading part and the display are placed in the same routine. For now, find a optimum delay which can meet ur requirement . U can try separating the display and ADC routine in future.
Thu Sep 18 2008, 01:27 PM
yeah it worked, my 7 segment does not blink that often so far, glad to have found this place for my project, thanks pdi33 and co. LOL. my project is finally completed and is operating smoothly.

but my professor is one guy who never get satisfied...zzzz. he says that there is more function that can be inserted in here:(. well kinda disappointing after hearing that but maybe can i ask one question?

is it possible that extra function can still be added in this project? based on the circuit on page 5 , i realised the SCK pin is still free and some pins on section 3 is still free. can i know example of functions that can still be inserted in this?

well he requested me to do something like ability to adjust the temperature sensor so that instead of above 30 degrees, the fan will on...but he prefers that if the user is able to adjust his own limit by inserting, 25,26,27 and etc instead of 30.

well it sounds complicated but wonder is this function could be inserted into the SCK pin or other free pins that have not been connected? of course programming comes later but just wondering about this though:)

PS: i plan to just pass up my project as it is, as they say, forget about the prof.,s request:P
Thu Sep 18 2008, 04:03 PM
hi silver,
glad it worked out well. :-) .
As for ur enhancement of the project ,what the prof. suggested is perfectly acceptable thoug u may need to add quite a bit of code and a single EEPROM ic in ur existing one.
u already have four switches connected to the uC so u will not need any more key interfacing to the unused pins except two lines which can be connected to a EEprom like 24c02. just change the existing function of the switches to SET/incremet and decrement functions.
say, when the user presses the set key, the display will show the user settable set temperature which can be changed by pressing the increment key and decrement key. when the set key is released show again the process temperature. Now, u will need a EEProm to store this user set memory as the RAM contents will wash out after power is switched off .
A nice example of such a setting procedure can be found in a project in download section by ajay called digital clock using DS1307.. here is the link:
good luck. :-)
Fri Sep 19 2008, 04:48 AM
i see, i think i get what you mean...

by the way, actually in the circuit of page 5, only 3 switches are actually usable cause they represent OFF, LOW and HIGH. but the 4th switch is not in used, my friend told me its possible that we can use the 4th switch for using SET mode, that when we press that the 7 segment will appear the current auto temperature we wanted for the fan to work, and then we will be able to press other 2 switches which has the function of increasing and decreasing the value:)

and then the EEPROM is to remember your current settings even after you OFF the circuit, i think i got it right:P?

by the way do i have to open a new topic for this?

is it possible that pdi33 can assist me in this? cause i might need some help in the programming and circuit part.

cause i am wondering where i should put my EEPROM(like 24C02) on which pin that is and what programme can be used for it to correspond with my 7 segment and 4 switches.
Fri Sep 19 2008, 05:05 PM
u can connect the 24cXX to any two unused port pins ( only 2 pins re required for interfacing). the interface is I2C protocol and u can find more about it here on this forum itself :-) .
And yes silver, not only pdi33 but the other mods/admins and even some very helpful members like gianni / experimenter are all there to help u out . So go ahead and try it out.
good luck.
Sat Sep 20 2008, 09:28 AM
hmmm, 2 pins. actually i planned to connect it to 3.5/3.6/3.7/SCK, its either these 4 pins. then as for the SET mode switch i plan to use SW 8, the fourth switch which is not in use.

do you think is it possible that way?

by the way, what extra code do i need to write in the assembly code? well really i wished that i should take assembly code class during my last semester:(. hope the admins can guide me a little, but i can understand the previous code on page 10 so far:)

[ Edited Sun Sep 21 2008, 02:53 AM ]
Sun Sep 21 2008, 06:48 AM
check the download section :
u will find general I2C routines to interface 24cXX with 8051.

check this application note on atmel website for interfacing 24Cxx with 8051

[ Edited Sun Sep 21 2008, 04:41 PM ]
Tue Sep 23 2008, 01:23 AM
ok, but lately i have been busy and will reply later the result of how it goes:)

thanks for the links pdi33.
Thu Feb 12 2009, 07:45 AM
I'm enw for assembly language so anyone can tell me how to compile the assembly language to hex file ?? cause i want to burn my microcontroller

Get Social


Powered by e107 Forum System


Wed Jan 22 2020, 06:16 PM
I m getting errors while simulation process during interfacing socket output and lcd... Can i get the report of ur project which is same as us.
Tue Jan 14 2020, 07:08 AM
shubham kharade
when i am trying to simulate the program in Proteus 8 professional, I am getting some errors as cannot find module file dhtxx.md can u help me
Tue Dec 17 2019, 01:44 PM
hello..i am programming industrial timer using 8051 with 24lc64 eeprom. i have query in storing the 3 diff value in eeprom with enter button. can anyone share c code ?
Tue Dec 17 2019, 10:30 AM
Hello. Can anyone share the code in Bascon and scheme in Proteus?
Thu Nov 21 2019, 12:30 PM
how to interface 8051 microcontroller with NRF24L01+ module
Sat Oct 12 2019, 10:23 PM
Log in.. then post your code in the 8051 forum
Sat Oct 12 2019, 10:18 AM
Bhadra Sajikumar
i am doing a countdown timer with 8051 for my project, unfortunately our professor had to take a leave of absence before he could teach us most of it.. can someone explain the .asm code of it for me?
Mon Sep 23 2019, 07:37 AM
I am doing a project for my schools wireless security system with cameras,sensors and spot lights using 8051 micro controller, could you help me out with the design and its source code.
Wed Sep 18 2019, 08:48 PM
Caryn Kover
Thank you for your time,
Mon Aug 05 2019, 07:09 PM
@Ismail ..post in forum, give details



Sat Jan 25 2020, 12:09 PM
Thu Jan 23 2020, 11:47 AM
Sun Jan 19 2020, 02:13 AM
Sat Jan 11 2020, 10:42 AM
Tue Jan 07 2020, 06:53 PM
Tue Jan 07 2020, 12:42 PM
Sun Dec 29 2019, 05:54 AM
Fri Dec 27 2019, 06:14 PM


Guests: 57, Members: 0 ...

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

Members: 38118
Newest member: wounder
Forum Activity
ExperimenterUK Avatar
Posted By ExperimenterUK
Sun Jan 26 2020, 04:05 AM
For a 12MHz crystal using a normal divided by 12 c...
wounder Avatar
Posted By wounder
Sat Jan 25 2020, 12:14 PM
I have a 8051 micro controller ,it has timer0,1,2,...
brucewilliams20 Avatar
Posted By brucewilliams20
Sat Jan 25 2020, 08:25 AM
Also, does anyone knows a platform where I can liv...
brucewilliams20 Avatar
Posted By brucewilliams20
Sat Jan 25 2020, 08:17 AM
Hi Mirza,That match and the politics, both are fin...
ExperimenterUK Avatar
Posted By ExperimenterUK
Fri Jan 17 2020, 10:24 PM
We will need the circuit diagram.A Proteus simulat...
Billz Avatar
Posted By Billz
Sat Jan 11 2020, 05:43 PM
hi everyone please attached files are my c code fo...
ExperimenterUK Avatar
Posted By ExperimenterUK
Tue Jan 07 2020, 08:18 PM
Not a stupid question.Setting up "Eclipse" can be...
elt Avatar
Posted By elt
Tue Jan 07 2020, 07:06 PM
So i have just began learning programming micros a...
Billz Avatar
Posted By Billz
Mon Jan 06 2020, 09:22 PM
I think it would be better if you guys try to come...
ExperimenterUK Avatar
Posted By ExperimenterUK
Mon Jan 06 2020, 12:22 AM
Can you post a circuit diagram and any code you ha...