I am using Keil 2 to run a program (a servo driven robotic arm) for the 87C552, I downloaded an example for the PWM usage from Keil.com, in C which works grand, but the compiler does not recognise any PWM refernces in assemblly. Why is this ? Is there any way around it?
If I include reg552.h instead, I get only the second set of errors
C:\KEIL\C51\INC\REG552.H(10): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
test.a(367): error A45: UNDEFINED SYMBOL (PASS-2)
All signns point to you having fraternal twins in your .a51 code both the 'default' SFRdef and, when added the 552 SFRdef. I do not know about using the 'canned' versions, but I need to insert $NOMOD51 Before including my SFR definition file in .a51 modules. Try it Erik
"I need to insert $NOMOD51 Before including my SFR definition file in .a51 modules." The A51 Assembler has the standard 8051 registers & SFRs built-in. Therefore, you don't need an include file if all you use is those "standard" symbols. Obviously, if you then include a file which also defines those "built-in" symbols, you will get an error like "ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL!" The $NOMOD51 directive removes the built-in definitions: http://www.keil.com/support/man/docs/a51/a51_nomod51.htm Note that C51 does not predefine any SFRs.
Wow thanks guys I am using
$NOMOD51 $INCLUDE (REG552.H)
yeeha :D Big one to ya guys
know to see if I can remember how its supposed to run, I wrote some of it about 5 months ago! No problem, you commented it beautifully - right? Erik
Ummm, But of course.... :)