[  ( -- )

published: 29 January 2023 / updated 1 February 2023

Lire cette page en français

 

Enter interpretation state. [ is an immediate word.

Example:

185 reg: TWSR   \ TWI Status Register 
%00000011 constant TWSR_TWPS    \ TWI Prescaler 
: i2c.init ( -- )               \ Set clock frequency to 100kHz  
    TWSR_TWPS TWSR mclr         \ prescale value = 1  
    [ Fcy 100 / 16 - 2/ ] literal TWBR c!  
    %00000011 TWCR mset TWCR mset  
  ;