Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
09/02/02 09:54
Read: times


 
#28395 - RE: uC/51 V1.00
Peter,

it is in the documentation (see page 8).

I'll work this out a litle bit more (currently it is only a preliminary doc, as mentioned...). I got many requests for using uC/51 for education, so I will write some kind of lesson orientated tutorial ASAP...

The main reason for the different treatment of the declarations is, that uC/51 only supports two memory modells: SMALL and LARGE. Both modells are able to handle up to 16 MB code and xdata (if needed). uC/51 can use ALL 51-er's memory areas.

In both models CONSTANT TOP LEVEL declarations (see page 8) are bound to CODE (like strings and tabel of constants), whereas all other global/static stuff is located in XRAM by DEFAULT. To locate globals/statics somwhere else, a qualifier must be used. There are:
near: lower internal RAM (128 bytes)
inear: whole internal RAM (256 bytes)
xdata: external RAM (64kB)
code: CODE (64kB)
bit: BIT area (256 locations). bit is only allowed as 'unsigned char bit' (values 0 and 1).
The use of 'far' has nothing to do with the memory areas, it is only used with pointers, the use is obsolete in many times (but may improve readability). 'far' will only be needed in some rare cases when uC/51's bank-linker is finished.
Qualifying function parameters and return types is not supported (such things will cause very nonportable code).

The only difference between SMALL and LARGE is the area, where LOCAL variables will be placed: SMALL: Locals in 'near', LARGE: Locals in 'xdata'. That's all.

About multiple 1-wire devices: the supplied drivers for the DALLAS 1-wire bus ARE able to address single nodes! We ARE using them on a network ;-). Even more, each DS1820's temperature value (in floating point format) is linearized afterwards for a better accuracy (the long term drift is better than 0.1 deg. Celsius in 4 years for some reference sensors...).

Juergen

List of 13 messages in thread
TopicAuthorDate
Free C compiler            01/01/70 00:00      
RE: Free C compiler            01/01/70 00:00      
RE: Free C compiler            01/01/70 00:00      
RE: Free C compiler            01/01/70 00:00      
RE: Free C compiler            01/01/70 00:00      
RE: uC/51 V1.00            01/01/70 00:00      
RE: uC/51 V1.00            01/01/70 00:00      
RE: uC/51 V1.00            01/01/70 00:00      
RE: uC/51 V1.00            01/01/70 00:00      
RE: uC/51 V1.00            01/01/70 00:00      
RE: Free C compiler - Juergen            01/01/70 00:00      
RE: Free C compiler - Juergen            01/01/70 00:00      
RE: uC/51 V1.00            01/01/70 00:00      

Back to Subject List