Dear JEC ;
i looked to that site but all codes are in asm i need in PBP if i can make it better for me .really i want to make it by myself since a week and i know it is not so good to want code from peoples but really i dont know anything about the this commination in picbasicpro

i read many documents and some code too but all in asm they explain everything in assembly language and when i want to make same thing in pbp then i have problem on interupts i think how can i solve it*?

i have seen your code in the forum and copyed it for my devices but couldnt make it yet your code was for "'F88 @ 16 MHz" but i have f877 and 20 mhz osc the code that what i posted here it is your code .do you have some example for me in picbasicpro only for beginner i need only led intensty
( PWM ) nothing more i tryed it like this small code too before but also problem (i look for adres on dipsw)


' PIC16F876 + 20 MHz
DEFINE OSC 20
@ DEVICE HS_OSC

DEFINE HSER_BITS 9
DEFINE HSER_RCSTA 208
DEFINE HSER_TXSTA 101
DEFINE HSER_BAUD 250000
DEFINE HSER_CLROERR 1

SYMBOL IN =PORTC.0
SYMBOL LED =PORTC.3 'LED

INPUT IN

TMP VAR WORD
TMP1 VAR WORD
VALORE VAR byte[8]
BREAK VAR WORD
NDMX VAR WORD
DATI VAR WORD
Clear

ADCON0=0
ADCON1=7

OPTION_REG.7=0
FOR TMP=0 TO 10
TOGGLE LED
PAUSE 200
NEXT TMP
LOW LED

MAIN:

NDMX=0
NDMX.0=PORTA.1
NDMX.1=PORTA.0
NDMX.2=PORTB.7
NDMX.3=PORTB.6
NDMX.4=PORTB.5
NDMX.5=PORTB.4
NDMX.6=PORTB.3
NDMX.7=PORTB.2
NDMX.8=PORTB.1
NDMX.9=PORTB.0

ndmx = ndmx ^ %0000001111111111
DATI=0
PULSIN in,0,break

IF BREAK>=44 THEN

HSERIN 2000,MAIN,[tmp,tmp1]
if tmp<>0 and tmp1<>0 then
goto main
endif

FOR TMP=1 TO ndmx
HSERIN 10,main,[tmp1]
NEXT TMP

FOR tmp=1 TO 64
hserin 10,EXIT,[VALORE[tmp]]
DATI=DATI+1
NEXT TMP

EXIT:
FOR TMP=1 TO DATI
VALORE[TMP]=VALORE[TMP]/4
NEXT TMP

'---------- here code that what i want to make for leds -----------------



ENDIF


GOTO MAIN