bonjour à tous,
je viens de faire une programme sur MikroBasic, et il me donne une erreur que je n'arrive pas à corriger. Quelq'un peut-il m'aider?
Voci le programme:
program Temperature
et voici l'erreur:Code:' Declarations section dim U1 as integer U2 as integer j1 as byte j2 as byte j3 as byte j4 as byte texte as char[16] texte1 as char[4] texte2 as char[16] texte3 as char[4] ' inittialisatio du port afficheur dim LCD_RS as sbit at RB4_bit LCD_EN as sbit at RB5_bit LCD_D7 as sbit at RB3_bit LCD_D6 as sbit at RB2_bit LCD_D5 as sbit at RB1_bit LCD_RS_Direction as sbit at TRISB4_bit LCD_EN_Direction as sbit at TRISB5_bit LCD_D7_Direction as sbit at TRISB3_bit LCD_D6_Direction as sbit at TRISB2_bit LCD_D5_Direction as sbit at TRISB1_bit LCD_D4_Direction as sbit at TRISB0_bit main: ' Initialisation des ports texte = "Température ext:" texte2 = "Température int:" adcon1 = 255 PORTE = 255 PORTB = 0 PORTB = 0xFF TRISE = 255 TRISB = 0 TRISB = 0xFF Lcd_Init Lcd_Cmd(_LCD_CURSOR_OFF) Lcd_Out(1,1,texte) 'programme principale des températures while true ow_reset(PORTE,2) ow_write(PORTE,2,$CC) ow_write(PORTE,2,$44) delay_us(120) ow_reset(PORTE,2) Ow_write(PORTE,2,$CC) ow_write(PORTE,2,$BE) delay_ms(1000) j1 = ow_read(PORTE,2) J2 = ow_read(PORTE,2) j1 = j1 >> 1 ByteToStr(j1,texte1) Lcd_Out(2,6,texte1) Lcd_Chr(2,9,233) Lcd_Chr(2,10,"C") delay_ms(500) wend end
38 303 Identifier "Lcd_Init" was not declared Horloge.mbas
38 304 Syntax error: Expected "end" but "Lcd_Init" found Horloge.mbas
39 304 Syntax error: Expected "." but "Lcd_Cmd" found Horloge.mbas
0 102 Finished (with errors): 04 déc. 2011, 16:10:04 Horloge.mbppi
Merci pour vos réponses.
Denis
-----