Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please, this need to be done in mplab Description: Create an application that uses the Led's and push buttons. Part I: Design a program to

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

Please, this need to be done in mplab

Description: Create an application that uses the Led's and push buttons. Part I: Design a program to monitor the push buttons and control the single green LED (not the tri-color LED). Pressing (button) 51 turns on the single-green LED, pressing $2 turns off the LED Green O Green Part II: Replace the code from Part I. Pressing (button) $1 turns on the single-green LED, pressing $1 a second time turns off the LED, (In order to accomplish this, you will need to check for a transition on the input pin) Part III: Add to this part Il so that both buttons operate. Monitor the S2 push button. Each time you press the S2 button, you light up the "next" color of the tri-color LED. RBG OOO Paye Break Append your source code here... (If you completed all 3 parts, just attach the source code for Part III, if you completed Parts I and II, then just include the source code for Part II) CMPET 355 - Schematic 7-gu INPUT ON/OFF 5 VOC Hegulator 5 UDC 3.3 VDC vor IN OUT FLENSP Rint Batt Test 30 teau GND MICS283.3 478 pF JD GND -H nalPTH LONGDAD Scope Dround GND GROUND 3.3 V POWER SUPPLY 300 PIC 16F 2520 SACC = 3.3 volts PICKIT 2/3 SA Programmer SA 1RE3 MCLR - I RE 282 BR86 RDS 1 1 1 1 T.1 FT 1 ETA FT 18 UF GNO RCA ROOTIOSOITUSCO B RONUL RCSO 14 RSS SUDC PIC18F2500-1/SP GNC EXPANSION C1 Green LED 88 PHM CONTROLLED BLU -2 LED-TRICOLOR RAS ROTARY 6.1900 RAZ for Lant 258 RA W SHITCH-HOMENTARY-2 GND NAVIGATION SHITCH GNO Above - Processor, Power, LED's Below - Peripherals LCD/XBEE SELECT 1C3C os 1C3B VCC RE RCT EXBEE GND 74000 RB4 IC30 4000 GNO Sparkun GP 2007 Ic LCD 7400D 7400D U53 VOD RCZ XBLE 5 VOC RESET gelecee25 LCD 4x20 RES RES Dico LCD GNO D104 1 XBEE-131 GND GND NHD-042003Z-NSW-BBW-V3-ND Xbee / GPS Bee / Bluetooth ADXL 345 LSMEDS3 PIEZO VCC RC2 EOF SGT RC23S BOSSZ SDA GAGS SDO 69512 INT1 RAR 653 RCS RC2 GND OL RAS G52 OND RE1 BUZZERPTH INSTALL JUMPER RC4 FOR LSMODS3 RCS GND 3.AXIS ACCELEROMETER GYROSCOPE ACCELEROMETER SA MCP4901 ICA RAD VEF RBO2cs RC SCK RC5_4 SD DAC YOU OND VOC DAC GND VCC VCC NC ENB GND 8-BIT DAC GND TMP36 A 5 VDC VDC APA 102C SERVO JP5 wh H RCS RC GND RCO ca 100 uF 1526-1076-ND GNO GNO Addressable LED (SPD) 1568-1502-ND Pins PIC 18F2520 - I/O Pin Description RAO Temperature Sense (analog input - ANO) RAI Battery Sense (analog input-ANI) RA2 Navigation Switch (analog input - AN2) RA3 Spare Analog (input - AN3) RA4 Rotary Encoder-B (input) 0:Active RAS Rotary Encoder-A (input) 0:Active RA6 ADXL/LSM6DS3 Chip Select (output) 0:Active RA7 Push Button-S2 (input) 0:Active RBO DAC Chip Select (output) 0:Active RBI Red LED (output) 0:Active RB2 Green LED (output) 0:Active RB3 Blue LED (output) 0:Active RB4 TxD Select (output) 0:LCD, 1:XBEE RB5 PGM (Pickit-3) RB6 PGC (Pickit-3) RB7 PGD (PicKit-3) RCO Servo (output) RCI Single Green LED (output) PWM2 RC2 Piezo/Audio Jack (output) PWM1 RC3 SPI-SCL (output) ADXL/LSM6DS3 Clock RC4 SPI-SDA (input) ADXL/LSM6DS3 Data SDO RCS SPI-SDO (output) ADXL/LSMODS3 Data SDA RC6 RS232-TxD (output) LCD / XBEE RC7 RS232-RxD (input) GPS/XBEE RE3 (MCLR) Vpp (Pickit-3) Expansion Pin Description 5V 3.3V RA3 Spare Analog (input) AN3 RC7 RxD (output) RC1 Single Green LED (output) PWM2 RC6 TxD (input) DAC MCP4901 (output) RC2 Piezo (output) PWM1 GND BOOBOO Peripherals Digital Inputs: Push-Button Rotary Encoder Digital Outputs: Tri-Color Led Servo PWM Outputs: Green Led Piezo Buzzer Analog Input: Temperature Sensor (TMP 36) Voltage Sensor (source voltage) Navigation Switch Spare Analog input (AN3) RS-232: LCD Character Display (mounting holes for 4x20 and 2x16) GPS XBEE / DigiMesh / Bluetooth (socket only) SPI: LSMDS3 (3-axis Gyroscope/Accelerometer/Temperature sensor) ADXL345 (3-axis Accelerometer) DAC (MCP4901) ACA102 Addressable LED Power Distribution 7-9 v 3.3 v 7805 MIC5203 PIC Piezo LCD Display Green LED LSM6DS3 ADXL ACA102 LED Tri Led Analog Inp Digital 1/0 GPS SERVO XBEE NAV Switch DAC 7400 CAREER GND Description: Create an application that uses the Led's and push buttons. Part I: Design a program to monitor the push buttons and control the single green LED (not the tri-color LED). Pressing (button) 51 turns on the single-green LED, pressing $2 turns off the LED Green O Green Part II: Replace the code from Part I. Pressing (button) $1 turns on the single-green LED, pressing $1 a second time turns off the LED, (In order to accomplish this, you will need to check for a transition on the input pin) Part III: Add to this part Il so that both buttons operate. Monitor the S2 push button. Each time you press the S2 button, you light up the "next" color of the tri-color LED. RBG OOO Paye Break Append your source code here... (If you completed all 3 parts, just attach the source code for Part III, if you completed Parts I and II, then just include the source code for Part II) CMPET 355 - Schematic 7-gu INPUT ON/OFF 5 VOC Hegulator 5 UDC 3.3 VDC vor IN OUT FLENSP Rint Batt Test 30 teau GND MICS283.3 478 pF JD GND -H nalPTH LONGDAD Scope Dround GND GROUND 3.3 V POWER SUPPLY 300 PIC 16F 2520 SACC = 3.3 volts PICKIT 2/3 SA Programmer SA 1RE3 MCLR - I RE 282 BR86 RDS 1 1 1 1 T.1 FT 1 ETA FT 18 UF GNO RCA ROOTIOSOITUSCO B RONUL RCSO 14 RSS SUDC PIC18F2500-1/SP GNC EXPANSION C1 Green LED 88 PHM CONTROLLED BLU -2 LED-TRICOLOR RAS ROTARY 6.1900 RAZ for Lant 258 RA W SHITCH-HOMENTARY-2 GND NAVIGATION SHITCH GNO Above - Processor, Power, LED's Below - Peripherals LCD/XBEE SELECT 1C3C os 1C3B VCC RE RCT EXBEE GND 74000 RB4 IC30 4000 GNO Sparkun GP 2007 Ic LCD 7400D 7400D U53 VOD RCZ XBLE 5 VOC RESET gelecee25 LCD 4x20 RES RES Dico LCD GNO D104 1 XBEE-131 GND GND NHD-042003Z-NSW-BBW-V3-ND Xbee / GPS Bee / Bluetooth ADXL 345 LSMEDS3 PIEZO VCC RC2 EOF SGT RC23S BOSSZ SDA GAGS SDO 69512 INT1 RAR 653 RCS RC2 GND OL RAS G52 OND RE1 BUZZERPTH INSTALL JUMPER RC4 FOR LSMODS3 RCS GND 3.AXIS ACCELEROMETER GYROSCOPE ACCELEROMETER SA MCP4901 ICA RAD VEF RBO2cs RC SCK RC5_4 SD DAC YOU OND VOC DAC GND VCC VCC NC ENB GND 8-BIT DAC GND TMP36 A 5 VDC VDC APA 102C SERVO JP5 wh H RCS RC GND RCO ca 100 uF 1526-1076-ND GNO GNO Addressable LED (SPD) 1568-1502-ND Pins PIC 18F2520 - I/O Pin Description RAO Temperature Sense (analog input - ANO) RAI Battery Sense (analog input-ANI) RA2 Navigation Switch (analog input - AN2) RA3 Spare Analog (input - AN3) RA4 Rotary Encoder-B (input) 0:Active RAS Rotary Encoder-A (input) 0:Active RA6 ADXL/LSM6DS3 Chip Select (output) 0:Active RA7 Push Button-S2 (input) 0:Active RBO DAC Chip Select (output) 0:Active RBI Red LED (output) 0:Active RB2 Green LED (output) 0:Active RB3 Blue LED (output) 0:Active RB4 TxD Select (output) 0:LCD, 1:XBEE RB5 PGM (Pickit-3) RB6 PGC (Pickit-3) RB7 PGD (PicKit-3) RCO Servo (output) RCI Single Green LED (output) PWM2 RC2 Piezo/Audio Jack (output) PWM1 RC3 SPI-SCL (output) ADXL/LSM6DS3 Clock RC4 SPI-SDA (input) ADXL/LSM6DS3 Data SDO RCS SPI-SDO (output) ADXL/LSMODS3 Data SDA RC6 RS232-TxD (output) LCD / XBEE RC7 RS232-RxD (input) GPS/XBEE RE3 (MCLR) Vpp (Pickit-3) Expansion Pin Description 5V 3.3V RA3 Spare Analog (input) AN3 RC7 RxD (output) RC1 Single Green LED (output) PWM2 RC6 TxD (input) DAC MCP4901 (output) RC2 Piezo (output) PWM1 GND BOOBOO Peripherals Digital Inputs: Push-Button Rotary Encoder Digital Outputs: Tri-Color Led Servo PWM Outputs: Green Led Piezo Buzzer Analog Input: Temperature Sensor (TMP 36) Voltage Sensor (source voltage) Navigation Switch Spare Analog input (AN3) RS-232: LCD Character Display (mounting holes for 4x20 and 2x16) GPS XBEE / DigiMesh / Bluetooth (socket only) SPI: LSMDS3 (3-axis Gyroscope/Accelerometer/Temperature sensor) ADXL345 (3-axis Accelerometer) DAC (MCP4901) ACA102 Addressable LED Power Distribution 7-9 v 3.3 v 7805 MIC5203 PIC Piezo LCD Display Green LED LSM6DS3 ADXL ACA102 LED Tri Led Analog Inp Digital 1/0 GPS SERVO XBEE NAV Switch DAC 7400 CAREER GND

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_2

Step: 3

blur-text-image_3

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

Advances In Knowledge Discovery In Databases

Authors: Animesh Adhikari, Jhimli Adhikari

1st Edition

3319132121, 9783319132129

More Books

Students also viewed these Databases questions

Question

=+What might this person do about becoming a passionate leader?

Answered: 1 week ago

Question

What impediments deal with regulators?

Answered: 1 week ago

Question

What are their performance levels?

Answered: 1 week ago