Discussion in "Project Help" started by    cenadius    Aug 19, 2007.
Tue Sep 16 2008, 10:15 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, 10:17 pm ]
Tue Sep 16 2008, 11:21 pm
silver,
in the delay routine written by ajay,
 delay:
        mov r6,#20
wait:
        mov r5,#255
        djnz r5,$
        djnz r6,wait
        ret

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, 06:57 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, 09:33 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:
http://www.8051projects.net/downloads21.html
good luck. :-)
Fri Sep 19 2008, 10:18 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, 10:35 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, 02:58 pm
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, 08:23 am ]
Sun Sep 21 2008, 12:18 pm
check the download section :
http://www.8051projects.net/download29.html
u will find general I2C routines to interface 24cXX with 8051.
:-)

P.S.
check this application note on atmel website for interfacing 24Cxx with 8051
http://www.atmel.com/dyn/resources/prod_documents/doc0507.pdf
http://www.atmel.com/dyn/resources/prod_documents/aat24cxx.exe


[ Edited Sun Sep 21 2008, 10:11 pm ]
Tue Sep 23 2008, 06:53 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, 01:15 pm
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

Information

Powered by e107 Forum System

Downloads

Comments

Bobbyerilar
Thu Mar 28 2024, 08:08 am
pb58
Thu Mar 28 2024, 05:54 am
Clarazkafup
Thu Mar 28 2024, 02:24 am
Walterkic
Thu Mar 28 2024, 01:19 am
Davidusawn
Wed Mar 27 2024, 08:30 pm
Richardsop
Tue Mar 26 2024, 10:33 pm
Stevencog
Tue Mar 26 2024, 04:26 pm
Bernardwarge
Tue Mar 26 2024, 11:15 am