Jump to content

ch701builder

Members
  • Content count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

About ch701builder

  • Rank
    Newbrie
  1. All, I have given up on trying to pay $900+ dollars for XC8 and was wanting to start learning SourceBoostC. I have found this example somewhere and had started to see how it works on my PICDEM 2 PLUS The LCD doesn't display anything and only 1 or the other LEDs will flash. MPLAB 8.9 BoostC 7.05 (the LED works in this example, but... the LCD doesn't display anything ************************************************************************************************** #include <system.h> #pragma CLOCK_FREQ 4000000 // configuration for PIC16F887 // External Crystal at High Speed // Disable Watchdog Timer. // Enable Power Up Timer. // Disable Brown Out Reset. // MCLR function is enabled // Disable Low Voltage Programming. #pragma DATA _CONFIG, _HS_OSC & _WDT_OFF & _PWRTE_ON & _BOR_OFF & _MCLRE_ON & _LVP_OFF // These setting are for the PICDEM2 PLUS board! #define LCD_ARGS 1, /* Interface type: mode 0 = 8bit, 1 = 4bit(low nibble), 2 = 4bit(upper nibble) */ \ 1, /* Use busy signal: 1 = use busy, 0 = use time delays */ \ PORTD, TRISD, /* Data port and data port tris register */ \ PORTD, TRISD, /* Control port and control port tris register */ \ 4, /* Bit number of control port is connected to RS */ \ 5, /* Bit number of control port is connected to RW */ \ 6 /* Bit number of control port is connected to Enable */ #include <lcd_driver.h> // LCD template code void main() { lcd_setup(); lprintf("LCD is ON"); trisb=0; // Make all of portb output while(1) { clear_bit(portb,2); delay_ms(500); set_bit(portb,2); delay_ms(500); }; // while } // main ************************************************************************************************************** (in this while loop, only LED1 will flash, not LED2) while(1) { clear_bit(portb,1); clear_bit(portb,2); delay_ms(500); set_bit(portb,2); set_bit(portb,1); delay_ms(500); }; // while } // main Any suggestions. The LCD is no big problem right now. My project doesn't use the LCD... but... current project using XC8 for is PIC16F887 (main IO) 28 - MUXED Analogs 4 - bitbang I2C 1 - bitband SPI 2 - UARTs UART comm to PIC24FJ256DA210 used for display and User IO running out of room using HiTechC/XC8 free mode, and don't want to spend $900+ dollars for XC8, especially since this is a hobby... (for now) Any suggestions, am I overlooking something obvious for SourceBoost? Thanks, Keith
×