GRAZIE !
PS: sto usando il micro con max232 su porta uart del micro PD0 / PD1
la comunicazione seriale funziona !
errori di compilazione non c'è ne sonno , ma i led non li controllo

:
$regfile = "m48def.dat"
$crystal = 16000000
$hwstack = 32
$swstack = 32
$framesize = 32
$baud = 115200
Config Com1 = 115200 , Synchrone = 0 , Parity = None , Stopbits = 1 , Databits = 8 , Clockpol = 0
Config Serialin = Buffered , Size = 255
Enable Serial
Start Timer1
Config Portd.2 = Output
Config Portd.3 = Output
Config Portd.4 = Output
Config Portd.7 = Output
Config Portd.0 = Input
Dim Ledcom As String * 25
Do
Ledcom = Inkey()
Select Case Ledcom
Case "1"
Portd.2 = 0
Print " led spento "
Case "2"
Portd.2 = 1
Print "led acceso"
Waitms 100
Case "3"
Portd.3 = 0
Print " led spento "
Case "4"
Portd.3 = 1
Print "led acceso"
Waitms 100
Case "5"
Portd.4 = 0
Print " led spento "
Case "6"
Portd.4 = 1
Print "led acceso"
Waitms 100
Case "7"
Portd.7 = 0
Print " led spento "
Case "8"
Portd.7 = 1
Print "led acceso"
End Select
Loop
End