Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need answers only. No need long explanation. Need answer inside 35 minutes please. Urgent. I will upvote. Thanks. Figure 5 shows the circuit connnetion for

image text in transcribed

image text in transcribed

Need answers only. No need long explanation. Need answer inside 35 minutes please. Urgent. I will upvote. Thanks.

Figure 5 shows the circuit connnetion for ATMega32 interface with LCD and two push button. Write a complete program based on the swith condition as in Figure 6. LCD2 LMOGL TEST 2 ASBA RESET O.. U1 RR2 99a 85382885 SW1 XTALI XTALE Swz .A 0 0 Oooooooo 8888888 DOO 01 DOO DO 04 DS O DO OT ADCO PALACE PAD PUSADOS PASIADOS HADOS PAUCT 14PTOCK PBUTI PEMBINTZ PSSIAN OCH P843 PESMOS POSO PICK ATMORE PCOSCE PCUDA PC/TEK POSTS PCUTDO PCV POSTO PCU TOSCE PCTTOSCR POROD POWED POINT POSANTE POLOCIS POSOCIA POLCP POUR POTION E AREY AVOC Figure 5 No switches pressed - Display "Please press SW" Swl pressed - Display "Selamat Datang" Sw2 pressed - Display "Welcome" Both SW press - Display "Press only 1 SW Figure 6 //Write your program here #include # define F_CPU 1000000UL #include i/define RS and E pin 3 marks void LCD_Command (unsigned char command); void LCD_data(char data); int main(void) { { l/configure 10 Ports 3 marks int sw; //declare wording 4 marks 1/set 8-bit data mode, 2 line, 5x7 font LCD_command(0x38); _delay_ms(5); LCD_Command(0x38); delay_ms(5); LCD_Command(@x38); _delay_ms(5), //set 8-bit data mode, 2 line, 5x7 font // set 8-bit data mode, 2 line, 5x7 font //display ON, cursor ON 1 mark //display ON, cursor ON 1 mark E. //display ON, cursor ON 1 mark l/configure IO Ports 3 marks int sw; //declare wording 4 marks //set 8-bit data mode, 2 line, 5x7 font LCD_Command(0x38); delay_ms(5); LCD_Command (@x38); delay_ms(5); LCD_Command (@x38); _delay_ms(5); 1/set 8-bit data mode, 2 line, 5x7 font // set 8-bit data mode, 2 line, 5x7 font // display ON, cursor ON 1 mark //display ON, cursor ON 1 mark //display ON, cursor ON 1 mark while (1) { LCD_command (0x80); _delay_ms(5); //position line 1 SW= //monitor switch 2 mark //if..else condition 10 mark

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions