Jump to content

Alex Finnon

Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Alex Finnon

  • Rank
    Newbrie
  1. I have been trying to write a common LCD routine when an interppt occurs on a 18F452, my snipit compiles but will not build due to the topic error. I have removed the DELAYS etc for ease of reading Failure Error: Function called in more than one execution thread: LCD_Clear Exit code was -2. Removing target: Clock.hex Failed to locate output file 'Clock.hex' Done Failed here is the code // Display Routine #include <system.h> #include <lcd_driver.h> // include the LCD template code #pragma CLOCK_FREQ 4000000 void interrupt( ) { #ifdef _PIC16 portb++; #else latb++; #endif lcd_clear(); lprintf( "F01:%5d", 6666); // generate formated output a check its as expected clear_bit( intcon, T0IF ); //clear TMR0 overflow flag } void main() { adcon1 = 00001110b; lcd_setup(); trisb = 0; //configure port B #ifdef _PIC16 portb = 0; //clear port B option_reg = 7; //set prescaler #else latb = 0; //clear port B // configure Timer0 set_bit( t0con, TMR0ON ); //enable timer clear_bit( t0con, T08BIT ); //set 16-bit mode clear_bit( t0con, T0CS ); // select internal clock clear_bit( t0con, PSA ); // select prescaler set_bit( t0con, T0PS0 ); // set 1:64 prescale ratio clear_bit( t0con, T0PS1 ); set_bit( t0con, T0PS2 ); #endif // enable interrupts lcd_clear(); lprintf( "F01:%5d", 9999 ); set_bit( intcon, T0IE ); //enable TMR0 overflow bit set_bit( intcon, GIE ); while( 1 ); }
  2. As I'm fairly new to PIC programming with SourceBoost does any one have any include/config or sample program files for the Schellelectronics OR Proton dev board ?
×
×
  • Create New...