Jump to content

Search the Community

Showing results for tags 'PIC18F26J50'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • PIC Embedded Programming
    • BoostC and Chameleon compilers programming
    • BoostC porting source code
    • BoostC++ compiler programming
    • BoostBasic compiler programming
    • Assembler programming PIC
    • Novo RTOS Programming
    • Hardware PIC
    • Enhancement Requests
    • Bug Reports

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL







Found 1 result

  1. Hi I wonder if anyone can help. I've bought a few PIC18F26J50's and have just upgraded to the latest version of SourceBooost (7.20), but cannot seem to get this particular PIC to work with a simple startup example (tried both the PIC's I have in case). I've had no problem with any of the previous types of PIC's I've been using. When I write to the PIC with my PICKIT2, the LED's I'm trying to flash light up briefly, as I would expect on writing the hex, showing me the hardware is likely ok. The loaded program just does not work. Code: #include <system.h> //#include <PIC18F26J50.h> #pragma config PLLDIV = 1 // No prescale (4 MHz oscillator input drives PLL directly) #pragma config XINST = OFF // Disabled #pragma config WDTEN = OFF // Disabled - Controlled by SWDTEN bit #pragma config STVREN = OFF // Disabled #pragma config CPUDIV = OSC1 // No CPU system clock divide #pragma config OSC = INTOSC // INTOSC #pragma config CP0 = OFF // Program memory is not code-protected #pragma config T1DIG = OFF // Secondary Oscillator clock source may not be selected #pragma config LPT1OSC = OFF // High-power operation #pragma config FCMEN = OFF // Disabled #pragma config IESO = OFF // Disabled #pragma config WDTPS = 1 // 1 #pragma config DSWDTOSC = INTOSCREF // DSWDT uses INTRC #pragma config RTCOSC = INTOSCREF // RTCC uses INTRC #pragma config DSBOREN = OFF // Disabled #pragma config DSWDTEN = OFF // Disabled #pragma config DSWDTPS = 2 // 1:2,097,152 (36 minutes) #pragma config IOL1WAY = OFF #pragma config MSSP7B_EN = MSK7 // MSSP address mask #pragma config WPFP = PAGE_0 // Write/Erase protect #pragma config WPEND = PAGE_0 // Write/Erase protect #pragma config WPCFG = OFF #pragma config WPDIS = OFF #pragma CLOCK_FREQ 8000000 #define LED1 portc.0 #define LED2 portc.1 void setup(void){ // Setup internal oscillater at 8Mhz osccon =0b01110000; // // setup ports to all digital output trisa=0; porta=0; trisb=0; portb=0; trisc=0; portc=0; // no a/d ancon0=0b11111111; // Digital ports ancon1=0b00011111; // Also digital ports adcon0=0b00000000; // No A/D adcon1=0b00000000; // No reference voltages wdtcon=0; // No watchdog timer // setup interrupts intcon =0b00000000; // Turn off Global, peripheral and timer 0 interrupts intcon2=0b00000000; // Nothing for us here intcon3=0b00000000; // Nothing for us here either pir1=0b00000000; // Actual interrupt registers - all cleared pir2=0b00000000; // Actual interrupt registers 2 - all cleared pir3=0b00000000; // Actual interrupt registers 3 - all cleared pie1=0b00000000; // No A/D conversion interrupt pie2=0b00000000; // Nothing for us here pie3=0b00000000; // Nothing for us here rcon=0b00000000; // We don't care about priorities here } void interrupt(void){ } void interrupt_low(void){ } void main(void){ setup(); while(1){ LED1=1; LED2=1; delay_s(1); LED1=0; LED2=0; delay_s(1); } } I've been at this a while now, off and on, but with the latest SourceBoost upgrade still cant get anything working. Any help would be greatly appreciated...
  • Create New...