mclr  ( c addr -- )

published: 30 January 2023 / updated 30 January 2023

Lire cette page en français

 

vocabulary: forth

Clear bits in addr register with mask c.

PIC24-30-33: 16-bit operation

ATMEGA and PIC18: 8-bit operation

Example:

$4c constant SPCR       \ SPI Control Register  
$4d constant SPSR       \ SPI Status Register  
$4e constant SPDR       \ SPI Data Register  
 
%01000000 constant SPCR_SPE     \ SPI Enable  
: spi.enable ( ---)  
    SPCR_SPE SPCR mset ;  
: spi.disable ( ---)  
    SPCR_SPE SPCR mclr ;