Answered step by step
Verified Expert Solution
Question
1 Approved Answer
need help. You have to make the following embedded system using 8051 Microcontroller and do the programming in C-Language. 1. Built in test 4 inputs
need help.
You have to make the following embedded system using 8051 Microcontroller and do the programming in C-Language. 1. Built in test 4 inputs are connected to P1.0 to P1.3 pins of controller. When 8051 will start it will check these lines individually. If signal is high at any of the pins do the following: P1.0 high => Print "System 1 Faulty" on LCD P1.1 high => Print "System 2 Faulty" and so on. If no pin is high than print all systems are OK on LCD. The LCD is connected to Porto and remaining pins of P1 (i.e.P1.4 to P1.7) 2. Wait for 3 Seconds Use different set of instructions to create a delay of 3 seconds. During this time the display of LCD should be shown as 3 sec, 2 sec, 1 sec after each passing second. Finally after 3 seconds it should display system ready. 3. Use of Timer/Counter Now set Timer O in counter mode such a way that the program waits for 8 pulses to arrive. Once 8 pulses are arrived. Send message on LCD "8 Pulses Arrived". 4. Getting data from port 2 Now you have to get 4 bytes of data from port 2. Hence wait for P1.0 to be high, when it is high send 00 to P3.6 and P3.7 and read data from Port 2 and save it. Now wait for P1.1 to be high, when it is high send 01 to P3.6 and P3.7 and read data from Port 2 and save it. Repeat the process for P1.2 and P1.3 to be high. Hence, at the end you will have four bytes. It is to be ensured that in program you have to ensure that you have to declare P1.0 (P1.1, P1.2 and P1.3) declared 1 if it remains one for at least 20 msec. 5. Making a data block and send it on serial link Now you have to make a data block of 8 Byte as under: 5A, 6B, 7C, 4 bytes of data gathered in step 5. The last byte will be XOR of all 7 previous bytes. unce this DIOCK is ready seng each dyte ir ne dock serially one by one using seria portat a Baua rate of YOUU and a protocol of 1 start bit 8 data bits and 1 stop bit. Repeat the program from step 3 for ever. You have to make the following embedded system using 8051 Microcontroller and do the programming in C-Language. 1. Built in test 4 inputs are connected to P1.0 to P1.3 pins of controller. When 8051 will start it will check these lines individually. If signal is high at any of the pins do the following: P1.0 high => Print "System 1 Faulty" on LCD P1.1 high => Print "System 2 Faulty" and so on. If no pin is high than print all systems are OK on LCD. The LCD is connected to Porto and remaining pins of P1 (i.e.P1.4 to P1.7) 2. Wait for 3 Seconds Use different set of instructions to create a delay of 3 seconds. During this time the display of LCD should be shown as 3 sec, 2 sec, 1 sec after each passing second. Finally after 3 seconds it should display system ready. 3. Use of Timer/Counter Now set Timer O in counter mode such a way that the program waits for 8 pulses to arrive. Once 8 pulses are arrived. Send message on LCD "8 Pulses Arrived". 4. Getting data from port 2 Now you have to get 4 bytes of data from port 2. Hence wait for P1.0 to be high, when it is high send 00 to P3.6 and P3.7 and read data from Port 2 and save it. Now wait for P1.1 to be high, when it is high send 01 to P3.6 and P3.7 and read data from Port 2 and save it. Repeat the process for P1.2 and P1.3 to be high. Hence, at the end you will have four bytes. It is to be ensured that in program you have to ensure that you have to declare P1.0 (P1.1, P1.2 and P1.3) declared 1 if it remains one for at least 20 msec. 5. Making a data block and send it on serial link Now you have to make a data block of 8 Byte as under: 5A, 6B, 7C, 4 bytes of data gathered in step 5. The last byte will be XOR of all 7 previous bytes. unce this DIOCK is ready seng each dyte ir ne dock serially one by one using seria portat a Baua rate of YOUU and a protocol of 1 start bit 8 data bits and 1 stop bit. Repeat the program from step 3 for everStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started