I discovered a new problem which I never seen or heard of before. My circuit works fine with the LCD hooked up. I removed the LCD restart and the pins output goes haywire..
I removed all the coding concerning the LCD in the program, did not work. Turns out, if I do not have 56 ohm resistance between the positive and negative, the circuit will not function properly. This resistance also need to be placed on the MCLR / ground rail !!!
here is the code I have, but I am not sure this will make a difference because the code does work with the 56ohm resistance..
'using a pic16F88 - on cart trial module.
' MPASM Header
OSCCON = %01110000 '8 Mhz
Define OSC 8
CMCON = 7 : ANSEL = 0 : ADCON1 = 7
' Define ADCIN parameters
Define ADC_BITS 8 ' Set number of bits in result
Define ADC_CLOCK 3 ' Set clock source (3=rc)
Define ADC_SAMPLEUS 50 ' Set sampling time in uS
ADCON1 = %00000010 'for 8 bit
value var word : variable var word : i var byte
'TRISA = %00000000 ' Set PORTA to all output
TRISB = %10000000
ADCON0.2 = 1 'Start Conversion
ADCIN 6, value 'Read channel PORTB.7
variable = 256 -value
variable = variable *14
PORTB.3 =1 'green led
PORTB.4 =0 'red led
PORTB.3 =0 'green led
PORTB.4 =1 'red led