problem in code of digital clock with alarm
Tue Aug 08 2006, 07:38 pm
hi !
ajay i had just tried to run the code in keil and got A6 error
please have a look at this code and try to compile it in keil
build: mov a,#40h ;Building custom character routine
acall command
build_char 04h,eh,eh,eh,1fh,0h,4h,0h ;BELL
build_char 1h,3h,0fh,0fh,0fh,3h,1h,0h ;SPEAKER OFF
build_char 8h,10h,0h,18h,0h,10h,8h,0h ;SPEAKER ON
build_char 0h,0eh,15h,17h,11h,0eh,0h,0h ;CLOCK
build_char 0h,1h,3h,16h,1ch,8h,0h,0h ;OK
build_char 0ah,1fh,1fh,1fh,0eh,4h,0h,0h ;HEART
build_char 2h,3h,2h,0eh,1eh,0ch,0h,0h ;MUSIC
ret
and i have initialized
build_char macro P1,P2,P3,P4,P5,P6,P7,P8 irp arg, mov a,#arg acall data_in endm endm
; build_char macro P1,P2,P3,P4,P5,P6,P7,P8*/ ;Macro for building a custom charac
; irp arg, <P1,P2,P3,P4,P5,P6,P7,P8>
mov a,#arg
acall data_in
endm
endm
this code at beginning
so please reply!!!
ajay i had just tried to run the code in keil and got A6 error
please have a look at this code and try to compile it in keil
build: mov a,#40h ;Building custom character routine
acall command
build_char 04h,eh,eh,eh,1fh,0h,4h,0h ;BELL
build_char 1h,3h,0fh,0fh,0fh,3h,1h,0h ;SPEAKER OFF
build_char 8h,10h,0h,18h,0h,10h,8h,0h ;SPEAKER ON
build_char 0h,0eh,15h,17h,11h,0eh,0h,0h ;CLOCK
build_char 0h,1h,3h,16h,1ch,8h,0h,0h ;OK
build_char 0ah,1fh,1fh,1fh,0eh,4h,0h,0h ;HEART
build_char 2h,3h,2h,0eh,1eh,0ch,0h,0h ;MUSIC
ret
and i have initialized
build_char macro P1,P2,P3,P4,P5,P6,P7,P8 irp arg, mov a,#arg acall data_in endm endm
; build_char macro P1,P2,P3,P4,P5,P6,P7,P8*/ ;Macro for building a custom charac
; irp arg, <P1,P2,P3,P4,P5,P6,P7,P8>
mov a,#arg
acall data_in
endm
endm
this code at beginning
so please reply!!!
Tue Aug 08 2006, 08:06 pm
its working.. what the problem in it? i mean.. you have to define each and eveything which is being used inside
i.e. the subroutine command, data_in
the code you have posted will not work alone
-------------------------
build_char macro P1,P2,P3,P4,P5,P6,P7,P8
 irp arg,
  mov a,#arg
  acall data_in
 endm
endmbuild: mov a,#40h ;Building custom character routine
acall command
build_char 04h,eh,eh,eh,1fh,0h,4h,0h ;BELL
build_char 1h,3h,0fh,0fh,0fh,3h,1h,0h ;SPEAKER OFF
build_char 8h,10h,0h,18h,0h,10h,8h,0h ;SPEAKER ON
build_char 0h,0eh,15h,17h,11h,0eh,0h,0h ;CLOCK
build_char 0h,1h,3h,16h,1ch,8h,0h,0h ;OK
build_char 0ah,1fh,1fh,1fh,0eh,4h,0h,0h ;HEART
build_char 2h,3h,2h,0eh,1eh,0ch,0h,0h ;MUSIC
ret
-----------------------------------------------
i.e. the subroutine command, data_in
the code you have posted will not work alone
-------------------------
build_char macro P1,P2,P3,P4,P5,P6,P7,P8
 irp arg,
  mov a,#arg
  acall data_in
 endm
endmbuild: mov a,#40h ;Building custom character routine
acall command
build_char 04h,eh,eh,eh,1fh,0h,4h,0h ;BELL
build_char 1h,3h,0fh,0fh,0fh,3h,1h,0h ;SPEAKER OFF
build_char 8h,10h,0h,18h,0h,10h,8h,0h ;SPEAKER ON
build_char 0h,0eh,15h,17h,11h,0eh,0h,0h ;CLOCK
build_char 0h,1h,3h,16h,1ch,8h,0h,0h ;OK
build_char 0ah,1fh,1fh,1fh,0eh,4h,0h,0h ;HEART
build_char 2h,3h,2h,0eh,1eh,0ch,0h,0h ;MUSIC
ret
-----------------------------------------------
[ Edited Tue Aug 08 2006, 08:08 pm ]
Tue Aug 08 2006, 08:33 pm
look at these errors in keil!! u may understand the problem from these errors
[ Edited Wed Aug 09 2006, 12:19 am ]
Wed Aug 09 2006, 12:23 am
first of all... please remove the startup.A51 file coz we are not using it in this case.. we use it mostly when we are dealing with C and assembly both
and if you are using it. send me the updated code
tell me which version of C51 you are using...
and if you are using it. send me the updated code
tell me which version of C51 you are using...
Wed Aug 09 2006, 02:13 am
i have removed the startup file although it dosent make any difference untill u add it in ur code.u wanted the information about my keil version so i am sending it to u
[ Edited Wed Aug 09 2006, 11:50 am ]
Wed Aug 09 2006, 11:22 am
it is working fine. it is also a full project. :hug
[ Edited Wed Aug 09 2006, 11:54 am ]
Powered by e107 Forum System