I need to re-configure the I/O pin assignement, so I re-wrote the code for new hardware. In ISIS I have this problem :
It's just one simulation problem or software problem ? Need advice ! Thanks !
Note : I modify pbppic14.lib like Mr.Darrel say in "LCD_Any_pin" and I have the properly .pbp in PBP directory.Code:@ DEVICE pic16F684, intrc_osc_noclkout, WDT_OFF, PWRT_OFF, BOD_OFF, MCLR_OFF define osc 4 TRISA= %00010000 TRISC= %10110000 CMCON0 = %00000111 'Disable analog comparators. DEFINE ADC_BITS 10 ' 10 bit A/D Conversion DEFINE ADC_CLOCK 3 DEFINE ADC_SAMPLEUS 50 ' 50 uS A/D sample time VRCON = %00000000 ' Disable Comparator Voltage Reference ANSEL = %10000000 ' Set pin (AN7) to analog input, the rest to digital ADCON0 = %10011101 ' Set up A/D converter - Right Just., VDD REF., CH 7, ON ADCON1 = %00110000 ' Set up A/D Converter clock source to internal RC ;----[ Change these to match your LCD ]--------------------------------------- LCD_DB4 VAR PORTA.2 LCD_DB5 VAR PORTC.0 LCD_DB6 VAR PORTC.1 LCD_DB7 VAR PORTC.2 LCD_RS VAR PORTA.0 LCD_E VAR PORTA.1 LCD_Lines CON 2 ' # of Lines on LCD, 1 or 2 (Note: use 2 for 4 lines) LCD_DATAUS CON 50 ' Data delay time in us LCD_COMMANDUS CON 2500 ' Command delay time in us INCLUDE "LCD_AnyPin.pbp"




Bookmarks