Skip to main content
Visitor II
March 20, 2006
Question

how bit manipulation in cosmic compiler ?

  • March 20, 2006
  • 2 replies
  • 786 views
Posted on March 20, 2006 at 10:33

how bit manipulation in cosmic compiler ?

    This topic has been closed for replies.

    2 replies

    icwangAuthor
    Visitor II
    March 20, 2006
    Posted on March 20, 2006 at 02:25

    In other c compiler , there is direct bit manipulation.

    such as

    PB.4 = 1;

    or

    INTCON.GIE = 1;

    How to write in cosmic compiler ?

    Thanks.

    Visitor II
    March 20, 2006
    Posted on March 20, 2006 at 10:33

    _Bool mybit; // general bit variable, requires the .bit segment to be declared in the linker file

    _Bool

    mailto:PA0@PADR:0

    ; // absolute bit variable, does not require the .bit segment

    mybit=0;

    while(1)

    {

    PA0=0;

    PA0=1; // Generate a waveform

    }

    Regards,

    Luca (Cosmic)