Discussion in "Project Help" started by    diya    Sep 5, 2007.
Thu Sep 06 2007, 01:41 am
#11
so the correct code will be :

ORG 0000

MOV A,P0
MOV A,66H
SETB P1.0
CLR P1.1
MOV A,P0
MOV A,6DH
SETB P1.1
CLR P1.0

DELAY:
MOV R5,#50H
BACK:
MOV R4,#0FFH
DJNZ R4,$
DJNZ R5,BACK

RET

END
---------------------------------------------------------
what about the one for the assignment, :mad
i think the displayer will change continously with the change of the temperature. the sensor is connected to the Analogu to digital coverter , so the digital waves ( different voltages) will be sent to P0 , right ? and then ... how its going to translate the voltages into Celsius degree and give the adress to the 7-segment pins ????????????? <---- now thats a good question

plz help me throug this so i can go to the next step .
thx
Thu Sep 06 2007, 12:59 pm
#12
did you check the code? or not?
well yes.. you asked a very good question.. so i want to advice you to read the datasheet carefully..
it says that with every 1degree rise in temp LM35 voltage o/p increases 10mV so... with this.. you need to do calibration of your LM35, take a thermometer and check the room temp.. and see what you are getting on your display.. and then try increasing the temperature.. and see what your display is showing.. this way you can calibrate your thermometer..
for example...
on 25°C your display shows 30H
on 26°C your display shows 35H
on 27°C your display shows 40H
then your calibrated scale will be 5 per degree.. so if from ADC you are getting a value 45H then you can figure out how much temp is it.. right..?

This calibration has to be done practical basis only.. i mean on your board.. and the above is just an example to explain the procedure.
Thu Sep 06 2007, 10:46 pm
#13
how to put that into a code .can u pls give me some ideas in doing so?
Thu Sep 06 2007, 11:26 pm
#14
better you ask your seniors or teachers.. coz this is more like hardware thing, than software..
Sat Sep 08 2007, 02:19 am
#15
ok , now i want to know , the coding of the 7-segment can be done without considering the ADC coding or not ?

because im kind of confused right now
Sat Sep 08 2007, 02:24 am
#16
my brain hurts
Sat Sep 08 2007, 02:38 am
#17
lol! think of me.. all students from same univ.. asking same thing again and again he he.. please search on google a bit.. and ask your teachers.. thats why they are there.. unless you ask.. they are not going to teach.. you are actually making them lazy
Sat Sep 08 2007, 02:46 am
#18
sorry for replying without waiting.

i found this code from cenadius post :

mov dptr,#decodedtable ;load the decoded values
mov temp,a ;where temp is a temp variable
anl a,#0F0H ;we just need the higher nibble
swap a
movc a,@a+dptr ; load the decoded value for
; the number to display

mov 7segport,a ;7segport is the port where 7segments
;are connected
acall delay ;you need some delay here.. about 10ms
;or more.. you can adjust it when u run
;then enable the common pin here
setb common1 ;for first 7-seg

;now we send the lower nibble
mov a,temp ;restore the number form temp
anl a,#0FH ;mask the higher nibble to extract
;lower nibble only
movc a,@a+dptr ;load the decoded value for
;lower nibble
mov 7segport,a ;send the decoded value
setb common2 ;enable the common pin for
;second 7-seg display
decodedtable:
db (decoded values here)....

---------------------------------------------------------
allright , i basicly understand this code exept some lines :

Q1/ why r u using the higher nibble and the lower nibble here
(sometime u set the highr nibble as "high" and some times "low" , same thin with the lower nibble) ?

Q2/ the decoded table .... is it going to contain the values of all digits that can be displyed on 7-segment , OR the vaues that is going to be representing the temperature only ?

now im geting confused on simple things !!!

take care
Sat Sep 08 2007, 02:51 am
#19


lol! think of me.. all students from same univ.. asking same thing again and again he he.. please search on google a bit.. and ask your teachers.. thats why they are there.. unless you ask.. they are not going to teach.. you are actually making them lazy

Ajay



looool , u r right , but these dayz they dont exist in there office , cuz they know that all students will come and ask loots of questions . beleive me :-)
Tue Sep 11 2007, 12:55 am
#20
BTW Ajay , can u answer my 2 questions plz

thx

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

StephenHauct
Sat Apr 27 2024, 09:38 am
Adamsaf
Sat Apr 27 2024, 07:12 am
Robertphype
Sat Apr 27 2024, 12:23 am
ktaletrryp
Fri Apr 26 2024, 10:55 pm
Robertrip
Fri Apr 26 2024, 11:20 am
ArnoldDiant
Fri Apr 26 2024, 03:53 am
RodneyKnorb
Thu Apr 25 2024, 07:08 pm
Williamjef
Thu Apr 25 2024, 02:08 pm