To develop a program for the PIC 16F84A using either MPLAB X IDE simulator software. T he...

70.2K

Verified Solution

Question

Electrical Engineering

To develop a program for the PIC 16F84A using either MPLAB X IDEsimulator software. T

he PIC 16F84A has 8 LEDs connected to Port B. The program is toconvert your student number (10 ASCII characters), taken in reverseorder, one character at a time, to Gray code.

Each converted character is to be displayed on 4 of the LEDsconnected to Port B (B0 to B3) of the microcontroller.

Further, each converted character will be displayed for 3seconds, with the LEDs turned OFF for 1 second between eachcharacter. Once all characters have been displayed the program willcontinue to run with all of the Port B LEDs flashing in a patternof Odd Numbered LEDs On and Even Numbered LEDS Off for 1 second,and then Odd Numbered LEDs Off and Even Numbered LEDS On for 1second. This pattern will repeat indefinitely.  

Answer & Explanation Solved by verified expert
4.5 Ratings (1062 Votes)
Inputcodeint led 13int led2 12int led3 11int led4 10int led5 9int led6 6int led7 5int led8 3 the setup routine runs once when youpress resetvoid setup initialize the digital pin as anoutputpinModeled OUTPUTpinModeled2 OUTPUTpinModeled3 OUTPUTpinModeled4 OUTPUTpinModeled5 OUTPUTpinModeled6 OUTPUTpinModeled7 OUTPUTpinModeled8 OUTPUT the loop routine runs over and overagain forevervoid loop digitalWriteled HIGHdelay    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students