PICC-Lite Issue :S

Status
Not open for further replies.

bsodmike

New Member
I have this in my file:

Code:
__CONFIG(HS & WDTDIS & UNPROTECT & PWRTEN); //Configuration Fuses

and I get this:

Code:
HI-TECH PICC Lite COMPILER (Microchip PIC) V8.05PL2
Copyright (C) 1984-2004 HI-TECH SOFTWARE
lcd+mouse_code-16f84a-picclite.c: __CONFIG()
     5: __CONFIG(0x3FFE & 0x3FFB & 0x3FFF & 0x3FF7);
                 ^ ) expected

Any ideas?

This is for the 16f84a and the fuses are listed correctly as per 'pic1684.h' in the picclite include directory....

Thanks,
--Mike
 
Have the same fuses configuration and version of picc lite (on linux), should compile. These are the command line options that I pass to the compiler.

Code:
picl -16F84A -q -Zg3 -O -W3 -Omain.hex main.c

# compilation flags used with the hitech picclite compiler
# -Zg3 => level 3 global optimisations
# -O   => post pass optimiser after code generation pass
# -W3  => compiler warnings at level 0 (0 is default - we want level 3)

I might be stating the obvious, have you checked for spelling error/ missing semicolon / missing bracket?
 
Well if I comment out that config fuses out it compiles perfectly!

This is my compile string:

picl -O -Zg9 -DXTAL_FREQ=20MHZ -16F84A lcd+mouse_code-16f84a-picclite.c

Thanks, Mike
 
:roll: Hmmm ... let's eliminate the actual set-up, this compiles ok on my machine

Code:
#include <pic.h>

// fuses configuration
// watchdog timer off, unprotect code, powerup timer on, high speed crystal/resonator
__CONFIG(WDTDIS & UNPROTECT & PWRTEN & HS);


//----------
static void setUp(void)
//----------
{

   //global settings
   GIE  = 1;	// enable global interrupts
   EEIE = 1;	// enable ee write complete interrupts

   // port B setup
   PORTB = 0;
   RBIF  = 0;	// clear PORTB interrupt flag
   RBIE  = 1;	// enable interrupt on change
   RBPU  = 1;	// set weak pull-ups 0=On,1=OFF
   // set PORTB pins 4,5,6,7 as input pins
   TRISB = 0b11110000;

   // port A set-up
   TRISA = 0b00000;
   PORTA = 0;

   //TMR0 setttings
   T0IF = 0;       // clear the interrupt flag
   T0IE = 0;       // disable interrupt

} 
//----------
void FooDelay(unsigned char counter)
//----------
{
	unsigned char	i;
	unsigned char	k;
	do {
		i = 4;
		do {
			k = counter;
			do {
			} while(--k);
		} while(--i);
	} while(--counter);
}

//----------
main()
//----------
{
	setUp();		// set-up the machine
	while(1) {		// go now into an endless loop
		FooDelay(250);
		PORTB ^= 10;
		FooDelay(250);
	}
}

with this compile line
Code:
 picl -O -Zg9 -q -W3 -16F84A main.c

I've attached the main.c file.
 

Attachments

  • main.c
    1.1 KB · Views: 291
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…