MikroElektronika PIC Microcontrollers PIC16 Uživatelský manuál Strana 54

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 172
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 53
mikroBASIC
- Basic Compiler for Microchip PIC microcontrollers
We recommend careful use of absolute directive, because you may overlap two
variables by mistake. For example:
dim Ndot as byte absolute $33
' Variable will occupy 1 byte at address $33
dim Nrem as longint absolute $30
' Variable will occupy 4 bytes at $30, $31, $32, $33,
' so changing Ndot changes Nrem highest
' byte at the same time
mikroBasic uses internal algorithm to distribute variables within RAM. If there is
a need to have variable at specific predefined address, use the directive absolute.
Also if, for some reason, you want to overlap existing variables, use the directive
absolute.
program lite
' example for P16F877A
dim image_trisa as byte absolute 133
main:
image_trisa = $ff
end.
MikroElektronika:
Development
tools
-
Books
-
Compilers
mikroBASIC
making it simple...
49
page
Example
Important
Runtime
Behavior
Zobrazit stránku 53
1 2 ... 49 50 51 52 53 54 55 56 57 58 59 ... 171 172

Komentáře k této Příručce

Žádné komentáře