Errori di compilazione con PICBASIC pro

Salve Sto iniziando ad apprendere i primi concetti sulla programmazione dei PIC. Ho comprato da Futura elettronica un circuito di controllo che mi aziona dei rele tramite software Winpic. Il mio problema e' che ho ricopiato il sorgente cosi' come l'ho trovato sulla rivista di elettronica e l'ho dato in pasto a picbasic pro (perche viene detto all'inizio del listato che il programma e' stato scritto in basic) ma quando lo vado a compilare mi da' la bellezza di 21 errori. Allego il sorgente che ho usato io e tratteggero' gli errori che mi da' picbasic. La domanda e' chiaramente come mai quegli errori visto che si presuma che il listato sia scritto da Futura in maniera corretta? '****************************************** '* Scheda per la gestione di 8 ingressi '* e di 8 uscite con 2 ingressi a/d. '* Questo progetto utilizza un '* PIC 16F876A a 8 Mhz. '****************************************** DEFINE OSC 8 DEFINE ADC_BITS 8 DEFINE ADC_CLOCK 3 DEFINE ADC_SAMPLEUS 50 SYMBOL RXPC=PORTA.2 SYMBOL TXPC=PORTA.3 SYMBOL ING1=PORTB.0 SYMBOL ING2=PORTB.1 SYMBOL ING3=PORTB.2 SYMBOL ING4=PORTB.3 SYMBOL ING5=PORTB.4 SYMBOL ING6=PORTB.5 SYMBOL ING7=POTRB.6 SYMBOL ING8=PORTB.7 SYMBOL RELE1=PORTC.0 SYMBOL RELE2=PORTC.1 SYMBOL RELE3=PORTC.2 SYMBOL RELE4=PORTC.3 SYMBOL RELE5=PORTC.4 SYMBOL RELE6=PORTC.5 SYMBOL RELE7=PORTC.6 SYMBOL RELE8=PORTC.7 SYMBOL RELES=PORTC SYMBOL INPUTS=PORTB DATO VAR BYTE Dato1 VAR BYTE Dato2 VAR BYTE Dato3 VAR WORD IndiEEP VAR BYTE 'Disabilita i convertitori A/D ADCON0=0 ADCON1=7 OPTION_REG=%00000000 'Imposta i PIN del micro come in o out Input RXPC----------------------------- Output TXPC--------------------------- Input ING1------------------------------ Input ING2------------------------------ Input ING3----------------------------- Input ING4------------------------------ Input ING5----------------------------- Input ING6------------------------------ Input ING7------------------------------- Input ING8------------------------------ Output RELE1--------------------------- Output RELE2-------------------------- Output RELE3-------------------------- Output RELE4--------------------------- Output RELE5-------------------------- Output RELE6-------------------------- Output RELE7-------------------------- Output RELE8-------------------------- 'Pone bassi i PIN della porta C del MICRO Low RELE1------------------------ Low RELE2------------------------ Low RELE3----------------------- Low RELE4 Low RELE5 Low RELE6 Low RELE7 Low RELE8 'Legge l'ultimo stato dalla porta C IndiEEP=0 GoSub READ_CODE 'Imposta la porta C PORTC=DATO MAIN: 'Attende i caratteri "**" di inizio 'protocollo e salva i successivi due 'caratteri in Dato1 e Dato2 SerIn RXPC,2,["**"],Dato1,Dato2 'Se l'ultimo carattere è diverso da "#" '(chiusura protocollo) ripeti operazione IF Dato2"#" Then MAIN 'Imposta la porta C come Dato1 PORTC=Dato1

'Salva nella EEPROM l'ultimo valore IndiEEP=0 DATO=Dato1 GoSub WRITE_CODE

'Legge i pin della porta B Dato1=PORTB

'Legge il valore del canale ADC 0 adcin 0, Dato2 Pause 10

'Legge il valore del canale ADC 1 adcin 1,Dato3 Pause 10

'Invia sulla porta seriale i dati letti SerOut TXPC,2,[Dato1,Dato2,Dato3]

'Ripeti ciclo GoTo MAIN

'Legge l'ultimo stato della porta C READ_CODE: Read IndiEEP,DATO Return

'Scrive l'ultimo dato della porta C WRITE_CODE: Write IndiEEP,Dato Return

Che la fortuna baci per 10 anni di fila chiunque rispondera' al messaggio anche solo per darmi qualche consiglio :-)

Reply to
paperetto
Loading thread data ...

comincia a leggere cosa dicono gli errori

e ad eliminare tutti gli errori di sintassi

e ad eliminare la roba che non serve

Input RXPC-----------------------------

i trattini!

poi ricompila.....

Ste

"paperetto" wrote in news:446cdb50$0$18287 $ snipped-for-privacy@reader1.news.tin.it:

Reply to
Ste

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.