I'm really tired right now. It still does not work... I will continue with it tomorrow. Just bored right know.
And also for the interested ones, I'm trying to write my second picbasic code. I thought it would be easy. It is not. I'm mixed up. I will post the code here, and actually it is nothing. I would really appreciate any help.

I was using this code in C, where I had an ADC header file. Now I 'm surt of trying to convert it to Picbasic.

'Aim: to use adc bits as inputs, apply sinusoidal input and
'upgrade the blink project a little further. The next step is going to
'be using interrupt.

DEFINE LOADER_USED 1
DEFINE RESET_ORG 800H

OpenADC(ADC_FOSC_32&ADC_RRIGHT_JUST&ADC_12_TAD,ADC _CH0&ADC_INT_OFF,0)
' I do not really know how to activate ADC, and use it. The above one
'is actually a c code.

Outvalue var PORTD.0

Outvalue= %0 'Set PORTD.0 output
TRISA = %11111111 ' Set PORTA to all input, so I can use ADC
' bits as input
ADCON1 = %10000010' Set PORTA analog and right justify result


SetChanneltoADC(ADC_CHO) ' Want to set channel 0

ConvertADC() 'Convert the ADC value


while (Busy adc()) ' while it is busy keep it in a loop



' adc_'result=Read ADC() 'I used ADCIN 0, adcresult

adc_result var word ' Create adc_'result to store result

Pause 500 ' Wait .5 second

ADCIN 0, adcresult ' Read channel 0 to adcresult

loop:if adcresult> 125 ' I thought if it is 8 bits
'2^8=256
Outvalue =! Outvalue

Pause 100 ' Wait .1 second
Goto loop ' Do it forever
End