> I must be doing something wrong because this is not working.
>     PORTBbits.RB0 = 0;
>
> I get an error for that second line:
>     error 26: '_PORTBbits' is not a structure/union member

You need to

#define NO_BIT_DEFINES
#include "pic14/pic16f627a.h"

or use

RB0 = 0;

Without NO_BIT_DEFINES, RB0 expands to PORTBbits.RB0, and
PORTBbits.RB0 expands to PORTBbits.PORTBbits.RB0, which calls for trouble.
The leading underscore is a relic from the old age of computing and is
used to separate the compiler symbol namespace (no leading _) from
user symbols (_ prepended).

> I cannot figure out where the compiler thinks _PORTBbits is coming from.

It's in the header file, way down.

Good luck,
Raphael

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to