Discussion in "Project Addition or Changes" started by    Arun Kumar V    Feb 2, 2007.
Tue Feb 06 2007, 08:51 pm
#21
as i told you..
_nop_() and _testbit_() are from INTRINS.H
so remove the header file inclusion..

and replace _nop_() with...
asm{nop;}

and _testbit_(bit) with
if(bit)
bit=0;

just do this.. and remove all the inclusions of the file INTRINS.H and make the above replacements.
Those are the only two main errors.. and are easy to remove.
Tue Feb 06 2007, 10:05 pm
#22
Hello Rickey

i tried what you asked me to do,

but it gives some other errors.

iam uploading the Clock_mod.c file in zip for your kind Persual.

i have modified the header file for use with DS89C4XX MCU and removed intrins.h header

kindly debug the code and upload it

thanks for your patientence


arun
Thu Feb 08 2007, 12:00 am
#23
there are few more changes like
bit_8 code *days[]
change it to.. const bit_8 *days[]
like that.. where ever you find a variable defined as code change it to const so that they will be stored in ROM.

change void main() to main()
and return 0; at the end.

Then recompile the C file and if any error post them here..
Please copy paste the errors, dont upload pdf, coz that take more space
Mon Feb 12 2007, 12:28 pm
#24
Hello Rickey

iam back from Tirupathi,

O.K, i have made the changes you suggested, and here are the errors:


Compiling...
stdout: Broken pipe

C:/WINDOWS/DESKTOP/CLOCK_~1.C(132) : syntax error: token -> 'bit' ; column 70
-:0: error 103: code not generated for 'main' due to previous errors

C:/WINDOWS/DESKTOP/CLOCK_~1.C(163) : syntax error: token -> 'return' ; column 6

Compile error! Output not generated.

and modified code in ZIP File

arun


Mon Feb 12 2007, 11:30 pm
#25
are you mad??
or you have never done programming?? really confused  :/ where you have put the return?? outside???? come on!
there is nothing like "bit" its a keyword... ok!
i was giving you example...
now i am attaching the code again.. so take a look and recompile it.. ok!
Tue Feb 13 2007, 11:54 am
#26
Hello Rickey!

thats some temper you have!

maybe you haven't been reading my previous posts where i have been constantly calling myself a programming NOVICE.

these are the mistakes novices commit.

O.K tried compiling your mod code, these are the errors:


Compiling...
stdout: Broken pipe
C:/WINDOWS/DESKTOP/CLOCK_~2.C(164) : warning 126: unreachable code

C:/WINDOWS/DESKTOP/CLOCK_~2.C(237) : syntax error: token -> '{' ; column 20
C:/WINDOWS/DESKTOP/CLOCK_~2.C(236) : error 103: code not generated for 'sec1' due to previous errors
C:/WINDOWS/DESKTOP/CLOCK_~2.C(236) : warning 85: in function sec1 unreferenced local variable : 'j'

Compile error! Output not generated.


i am new to Programming and is like greek to me.

pl. go thru the Clock_mod code and rectify and typo errors.

arun
Tue Feb 13 2007, 12:18 pm
#27
its ok! well me a little short tempered lol! so dont worry! and my apologies for whatever i said
i have made the changes and.. i think there will be no problem now. i hope your header file declarations are ok!
Thu Feb 15 2007, 08:19 pm
#28
Hello Rickey

Take a look at this Doc.

i found this in a 8051 Book, it is useful in calculating delays for Different MCUs.

i think the Delay Function in your Program only needs to be changed to make the code work with DS89C450

now it should be easy !

BTW this thread is at the top of the charts in your forum with 240+ views (seems like HOT STUFF)

arun
Thu Feb 15 2007, 08:26 pm
#29
and theres one more thing i want to add

NOTE THAT 8051 TIMERS USE 1/12 OF XTAL FREQ. REGARDLESS OF MACHINE CYCLE TIME

arun
Thu Feb 15 2007, 09:39 pm
#30
yes i know that.. regarding delay.. once your clock is working.. i mean u get the hex file.. then burn it. keep on chaging the delay routine unless you get a right delay
hmm.. this thread is viewed a lot of time. being #1 and frequent replies

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

AntoniaRoons
Fri Apr 19 2024, 09:59 pm
carpinteyrowrl
Fri Apr 19 2024, 02:51 pm
DonaldJAX
Fri Apr 19 2024, 01:08 pm
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