Vad har jag missat?
Detta är bara början på ett program därför finns inget att alls i main.
Kod: Markera allt
#define Buzz PORTA.F4
#define ProtectEN PORTB.F3
#define Fan PORTB.F2
//LCD module connection
sbit LCD_RS at RB4_bit;
sbit LCD_EN at RB5_bit;
sbit LCD_D4 at RA6_bit;
sbit LCD_D5 at RA7_bit;
sbit LCD_D6 at RA0_bit;
sbit LCD_D7 at RA1_bit;
sbit LCD_RS_Direction at TRISB4_bit;
sbit LCD_EN_Direction at TRISB5_bit;
sbit LCD_D4_Direction at TRISA6_bit;
sbit LCD_D5_Direction at TRISA7_bit;
sbit LCD_D6_Direction at TRISA0_bit;
sbit LCD_D7_Direction at TRISA1_bit;
//End LCD module connection
void initMain(){
ADCON0=0b00000000;
ADCON1=0b00000000;
ANSELA=0b00000000;
TRISA=0b00000000;
TRISB=0b00000000;
LCD_Init();
LCD_Cmd(_LCD_CURSOR_OFF);
Fan=1;
// Buzz=1;
Delay_ms(100);
Buzz=0;
Fan=0;
Lcd_Out(1,1,"TEST");
}
void main() {
initMain();
while(1){
}
}