Special Function Register (SFR) definitions / include file ?

General discussion on mikroC PRO for 8051.
Post Reply
Author
Message
Aaron Walsh
Posts: 2
Joined: 12 Oct 2016 14:52

Special Function Register (SFR) definitions / include file ?

#1 Post by Aaron Walsh » 12 Oct 2016 15:11

Hi,

Are the Special Function Registers (SFR) already defined in mikroC ? For example I am using the Atmel AT89C51ED2 and I don't want to re-invent the wheel and define the addresses of the SFR's myself. Does mikroC come with the header file ?

Thank you very much
Aaron

User avatar
lana.arsic
mikroElektronika team
Posts: 1715
Joined: 15 Jan 2016 12:50

Re: Special Function Register (SFR) definitions / include fi

#2 Post by lana.arsic » 13 Oct 2016 14:22

Hi Aaron,

Welcome to the MikroE forum.

Unfortunately, defs files for 8051 compilers are not open source.
But all SFR registers specified on page 4 of datasheet are defined in the compiler on the same way as in datasheet:

http://www.atmel.com/images/doc4235.pdf

When you type beginning letters of some register you can use Code Assistant
(Ctrl + Space) in order to see how it is named in the compiler.

Best regards,
Lana

Post Reply

Return to “mikroC PRO for 8051 General”