Skip to content

Commit

Permalink
Update LCD.c
Browse files Browse the repository at this point in the history
  • Loading branch information
Farahihab authored Jun 15, 2021
1 parent a49df9a commit 2ad22f9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions LCD.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ void LCD_init(void){
GPIO_PORTA_AMSEL_R&= ~0xE0; //disable analog selection
}

void LCD_Command(char com){ //Rs: PA5 ,, Rw: PA6 ,, EN: PA7
void LCD_Command(char com){ //Rs: PA5 ,, Rw: PA6 ,, EN: PA7

GPIO_PORTA_DATA_R = 0; //clear bits A5,A6 (rs&rw)
GPIO_PORTA_DATA_R = 0; //clear bits A5,A6 (rs&rw)
GPIO_PORTB_DATA_R= com;
GPIO_PORTA_DATA_R|=0X80; // enable A7 for Enable latch
GPIO_PORTA_DATA_R|=0X80; // enable A7 for Enable latch
delay_ms(1);
GPIO_PORTA_DATA_R &= ~0xE0; //return Enable latch back to zero //return Enable latch back to zero
GPIO_PORTA_DATA_R &= ~0xE0; //return Enable latch back to zero //return Enable latch back to zero

}

Expand Down

0 comments on commit 2ad22f9

Please sign in to comment.