This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Using binary constants

The µVision3 accepts binary constants with a 'y' or 'Y' as a suffix. The following lines will not be compiled correctly:

SSPCR0 = (1111y<<0)|//16 data bits
(0<<4)| //SPI
(0<<6)| //Clock out polarity
(1<<7)| //Clock out phase
(1<<8); //Clock rate

What is the reason for the message "error C25: syntax error near 'y'"?
How do I sign binary constants in program code?
I already tried "1111Y", "1111b" and "1111B". No success.

Regards
Martin

0