Begining with pic programing in C
The following prog works on a pic16f84A #include /***** CONFIGURATION *****/ __CONFIG(0x3F61); /***** MAIN PROGRAM *****/ void main() { // Initialisation TRISB = 0b00000000; PORTB = 0b11110000; for (;;) { // turn on LED only if button pressed if ( RA0 == 1 ) PORTB = 0b000011; else PORTB = 0b110000;
} // repeat forever }
But the read RA0 never occurs on a pic16f627 Diplay is allways 0b110000
I am using picc ( lite ) from command line or via a Makefile picc --warn=9 --chip=16f627a less2.c BTW: if I use --strict, it refuse to compile ( to many errors -- FROM the included file /usr/local/hitech/picc/9.8/include/pic16f627.h ) ???
Tested on a Vellman kit K8048 ( here a VM111 as I buy it fully monted )
It gives the same results when using MPlab??