Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using MPLAB and the given code ... the given code makes my 4 leds light simultaneously I have to modify the code to display my

Using MPLAB and the given code ... the given code makes my 4 leds light simultaneously I have to modify the code to display my number 2 or 0010 meaning only led 2 will lit and also modify the code to display number 2 in ascii which is 50 so I have to display the number 0 or 0000 ... need this two modified its simple I just need to see others work .. image text in transcribed
image text in transcribed
Use either the Cloud IDE (MPLab Xpress IDE) or the PC IDE (MPLab X IDE). Assumed the Z# as 123456789 in the examples below. Import the '2-HelloWorld zip folder for your Lab 1. Modify it for the following steps.: 1. Display the last digit of your Z" in binary (hex) on LEDs. For example, a 9 would be displayed as 1001. It should be continuously displayed, unlike the project code which shows the LEDs lit alternately 2. Display the lower part of the last digit of your Z# in Ascil (the lower significance decimal digit of ASCI) on LEDs. For example, a 9 is equivalent to 57 in decimal notation in ASCII. So, represent 7 on LEDS in binary format, as 0111. It should be continuously displayed, unlike the project code which shows the LEDs lit alternately. 43 #include "mcc-generated-files/mcc.h" 44 45 46/* 47 Main applicatior 48*/ 49 void main(void) ( 50 51 SYSTEM_Initialize(O; while(1) f delay_ms (250); LEDO Toggle); LED1_Toggle(); LED2_ Toggle(); LED3_Toggle); 53 54 56 57 58 59 60 delay ms (250); Use either the Cloud IDE (MPLab Xpress IDE) or the PC IDE (MPLab X IDE). Assumed the Z# as 123456789 in the examples below. Import the '2-HelloWorld zip folder for your Lab 1. Modify it for the following steps.: 1. Display the last digit of your Z" in binary (hex) on LEDs. For example, a 9 would be displayed as 1001. It should be continuously displayed, unlike the project code which shows the LEDs lit alternately 2. Display the lower part of the last digit of your Z# in Ascil (the lower significance decimal digit of ASCI) on LEDs. For example, a 9 is equivalent to 57 in decimal notation in ASCII. So, represent 7 on LEDS in binary format, as 0111. It should be continuously displayed, unlike the project code which shows the LEDs lit alternately. 43 #include "mcc-generated-files/mcc.h" 44 45 46/* 47 Main applicatior 48*/ 49 void main(void) ( 50 51 SYSTEM_Initialize(O; while(1) f delay_ms (250); LEDO Toggle); LED1_Toggle(); LED2_ Toggle(); LED3_Toggle); 53 54 56 57 58 59 60 delay ms (250)

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

Recommended Textbook for

Oracle Database Administration The Essential Reference

Authors: Brian Laskey, David Kreines

1st Edition

1565925165, 978-1565925168

More Books

Students also viewed these Databases questions

Question

How would we like to see ourselves?

Answered: 1 week ago