* (ARM peripheral access)
 
Syntax


* variable

* constant

* ( expression)          ' added in version 8.04 of the compiler

Description


The C pointer syntax is used to give direct access to the ARM peripheral registers.

This gives the programmer the ability to directly control the ARM hardware.  Details on what the registers do can be found in the NXP User Manuals for the corresponding chip (LPC2103 for ARMmite, ARMexpress LITE, PRO,  LPC2106 for ARMexpress,  LPC2138 for ARMweb, and  LPC1751/6 for the PROplus and SuperPRO)

Examples of programming the registers can be found in the BASIClib directory which contains sub-programs that control various hardware functions.

Example

' from the HWPWM.bas  library

'* ---- Timer 2 --------------------------------------------
#define T2_TCR         * &HE0070004
#define T2_TC           * &HE0070008
#define T2_PR           * &HE007000C
#define T2_MCR        * &HE0070014
#define T2_MR0         * &HE0070018
#define T2_MR1         * &HE007001C
#define T2_MR2         * &HE0070020
#define T2_MR3         * &HE0070024

 T2_PR  = prescale
 T2_TCR = TxTCR_COUNTER_ENABLE            ' Timer1 Enable
 
 T2_MR3 = cycletime -1
 T2_MCR = 0x400    ' rollover when count reaches MR3

Differences from other BASICs

See also